Merge pull request #10036 from fabrixxm/fix-installer-themes

Installer: install themes as last action
pull/10038/head
Hypolite Petovan 2021-03-12 14:43:58 -05:00 zatwierdzone przez GitHub
commit f8e3c687d7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -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;
@ -163,6 +164,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;
}
}