]> git.mxchange.org Git - friendica.git/commitdiff
Auto-remove duplicated, allowed themes during reload
authorPhilipp Holzer <admin+github@philipp.info>
Sat, 17 Aug 2019 18:00:11 +0000 (20:00 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Sat, 17 Aug 2019 18:00:11 +0000 (20:00 +0200)
src/Module/Admin/Themes/Index.php

index 69c6419bc4af53f202ab7d396c4e09060ffe5941..d29b4c33caea64b438d477887dc7ccb198fda47b 100644 (file)
@@ -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;