diff options
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index a379f23a1ef..b49ba49ebb8 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -81,6 +81,7 @@ class TemplateLayout extends \OC_Template { /** @var IInitialStateService */ $this->initialState = \OC::$server->get(IInitialStateService::class); + // Decide which page we show if ($renderAs === TemplateResponse::RENDER_AS_USER) { /** @var INavigationManager */ @@ -99,6 +100,13 @@ class TemplateLayout extends \OC_Template { $this->initialState->provideInitialState('unified-search', 'live-search', $this->config->getAppValue('core', 'unified-search.live-search', 'yes') === 'yes'); Util::addScript('core', 'unified-search', 'core'); + // Set body data-theme + if (\OC::$server->getAppManager()->isEnabledForUser('theming') && class_exists('\OCA\Theming\Service\ThemesService')) { + /** @var \OCA\Theming\Service\ThemesService */ + $themesService = \OC::$server->get(\OCA\Theming\Service\ThemesService::class); + $this->assign('enabledThemes', $themesService->getEnabledThemes()); + } + // set logo link target $logoUrl = $this->config->getSystemValueString('logo_url', ''); $this->assign('logoUrl', $logoUrl); |