aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-22 09:56:12 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-22 11:24:25 +0200
commit850d8ac1cd9e5b28e37668469237d8daa5c5d51d (patch)
tree995400b3fe2e8f8b07b250ade23ceb9817ac11ba /lib
parent05a33ad713f47b8cfe400447ec9c4c1f8be310bd (diff)
downloadnextcloud-server-850d8ac1cd9e5b28e37668469237d8daa5c5d51d.tar.gz
nextcloud-server-850d8ac1cd9e5b28e37668469237d8daa5c5d51d.zip
Add default theming disabled fallback
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/TemplateLayout.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index b49ba49ebb8..4b53af37679 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -81,6 +81,11 @@ class TemplateLayout extends \OC_Template {
/** @var IInitialStateService */
$this->initialState = \OC::$server->get(IInitialStateService::class);
+ // Add fallback theming variables if theming is disabled
+ if (!\OC::$server->getAppManager()->isEnabledForUser('theming')) {
+ // TODO cache generated default theme if enabled for fallback if server is erroring ?
+ Util::addStyle('theming', 'default');
+ }
// Decide which page we show
if ($renderAs === TemplateResponse::RENDER_AS_USER) {