Installer: install themes as last action
this will register theme hooks
This commit is contained in:
parent
a41c657790
commit
225a37af9a
1 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,7 @@ use Friendica\BaseModule;
|
||||||
use Friendica\Core;
|
use Friendica\Core;
|
||||||
use Friendica\Core\Config\Cache;
|
use Friendica\Core\Config\Cache;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
use Friendica\Core\Theme;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Network\HTTPException;
|
use Friendica\Network\HTTPException;
|
||||||
use Friendica\Util\BasePath;
|
use Friendica\Util\BasePath;
|
||||||
|
@ -163,6 +164,16 @@ class Install extends BaseModule
|
||||||
|
|
||||||
self::$installer->installDatabase($configCache->get('system', 'basepath'));
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue