From 7e82f8dc2e43b71a539705f414adc0e30b20e77e Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 17 Aug 2019 19:55:14 +0200 Subject: [PATCH 1/2] fix Admin Theme reload --- src/Module/Admin/Themes/Index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Admin/Themes/Index.php b/src/Module/Admin/Themes/Index.php index 71a91919bd..69c6419bc4 100644 --- a/src/Module/Admin/Themes/Index.php +++ b/src/Module/Admin/Themes/Index.php @@ -26,8 +26,8 @@ class Index extends BaseAdminModule switch ($_GET['action']) { case 'reload': foreach ($allowed_themes as $theme) { - Theme::uninstall($theme['name']); - Theme::install($theme['name']); + Theme::uninstall($theme); + Theme::install($theme); } info('Themes reloaded'); From d39a6ba444005aea44ff41fa65f98555cb0acd17 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 17 Aug 2019 20:00:11 +0200 Subject: [PATCH 2/2] Auto-remove duplicated, allowed themes during reload --- src/Module/Admin/Themes/Index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Module/Admin/Themes/Index.php b/src/Module/Admin/Themes/Index.php index 69c6419bc4..d29b4c33ca 100644 --- a/src/Module/Admin/Themes/Index.php +++ b/src/Module/Admin/Themes/Index.php @@ -25,10 +25,12 @@ class Index extends BaseAdminModule switch ($_GET['action']) { case 'reload': + $allowed_themes = array_unique($allowed_themes); foreach ($allowed_themes as $theme) { Theme::uninstall($theme); Theme::install($theme); } + Theme::setAllowedList($allowed_themes); info('Themes reloaded'); break;