Bugfix: Fix internal theme reset button

This commit is contained in:
Starbeamrainbowlabs 2019-10-20 01:25:02 +01:00
parent cc5f7561b0
commit ab033c7fd3
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 7 additions and 2 deletions

View File

@ -155,7 +155,7 @@
"version": "0.3",
"author": "Starbeamrainbowlabs",
"description": "Adds a theme gallery page and optional automatic theme updates. Contacts a remote server, where IP addresses are stored in automatic server logs for security and attack mitigation purposes.",
"lastupdate": 1571530718,
"lastupdate": 1571531070,
"optional": false,
"extra_data": []
},

View File

@ -121,9 +121,14 @@ register_module([
if($_GET["theme-selector"] === "default-internal") {
$settings->css_theme_gallery_selected_id = $guiConfig->css_theme_gallery_selected_id->default;
$settings->css_theme_gallery_selected_id = $guiConfig->css_theme_gallery_selected_id->default;
$settings->css_theme_autoupdate_url = $guiConfig->css_theme_autoupdate_url->default;
$settings->css = $guiConfig->css->default;
if(!save_settings()) {
http_response_code(503);
exit(page_renderer::render_main("Server error - $settings->sitename", "<p>Oops! $settings->sitename wasn't able to save the <code>peppermint.json</code> settings file back to disk. If you're the administrator, try checking the permissions on disk. If not, try contacting $settings->sitename's administrator, who's contact details can be found at the bottom of every page.</p>"));
}
exit(page_renderer::render_main("Theme reset - Theme Gallery - $settings->sitename", "<p>$settings->sitename's theme has been reset to the internal theme.</p>
<p>Go to the <a href='?action=$settings->defaultaction'>homepage</a>.</p>"));
}