]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Install.php
Prevent settings/userexport to be used by anonymous users
[friendica.git] / src / Module / Install.php
index 95644ae6259b1e3aaa2e34ca118e3face19a7e16..c61f162338f7b04b5e146e0b51ce24cabaccf0b8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -26,6 +26,7 @@ use Friendica\BaseModule;
 use Friendica\Core;
 use Friendica\Core\Config\Cache;
 use Friendica\Core\Renderer;
+use Friendica\Core\Theme;
 use Friendica\DI;
 use Friendica\Network\HTTPException;
 use Friendica\Util\BasePath;
@@ -162,6 +163,16 @@ class Install extends BaseModule
                                }
 
                                self::$installer->installDatabase($configCache->get('system', 'basepath'));
+                       
+                               // install allowed themes to register theme hooks
+                               // this is same as "Reload active theme" in /admin/themes
+                               $allowed_themes = Theme::getAllowedList();
+                               $allowed_themes = array_unique($allowed_themes);
+                               foreach ($allowed_themes as $theme) {
+                                       Theme::uninstall($theme);
+                                       Theme::install($theme);
+                               }
+                               Theme::setAllowedList($allowed_themes);
 
                                break;
                }