Fix default fallback theme on setup ang guests pages

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ 2022-04-26 08:50:41 +02:00
parent 8bcba22d77
commit 6ec0dfeece
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -82,7 +82,8 @@ class TemplateLayout extends \OC_Template {
$this->initialState = \OC::$server->get(IInitialStateService::class);
// Add fallback theming variables if theming is disabled
if (!\OC::$server->getAppManager()->isEnabledForUser('theming')) {
if ($renderAs !== TemplateResponse::RENDER_AS_USER
|| !\OC::$server->getAppManager()->isEnabledForUser('theming')) {
// TODO cache generated default theme if enabled for fallback if server is erroring ?
Util::addStyle('theming', 'default');
}