Auto-remove duplicated, allowed themes during reload

This commit is contained in:
Philipp Holzer 2019-08-17 20:00:11 +02:00
parent 7e82f8dc2e
commit d39a6ba444
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90

View file

@ -25,10 +25,12 @@ class Index extends BaseAdminModule
switch ($_GET['action']) { switch ($_GET['action']) {
case 'reload': case 'reload':
$allowed_themes = array_unique($allowed_themes);
foreach ($allowed_themes as $theme) { foreach ($allowed_themes as $theme) {
Theme::uninstall($theme); Theme::uninstall($theme);
Theme::install($theme); Theme::install($theme);
} }
Theme::setAllowedList($allowed_themes);
info('Themes reloaded'); info('Themes reloaded');
break; break;