Merge pull request #32147 from nextcloud/fix/css-default-load-setup-guest

Fix default fallback theme on setup any guests pages
This commit is contained in:
John Molakvoæ 2022-04-26 09:49:08 +02:00 committed by GitHub
commit 8a3f8b07a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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');
}