diff options
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 374972ece22..cfc387d2164 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -144,12 +144,6 @@ class TemplateLayout { $userDisplayName = $user->getDisplayName(); } - $page->assign('enabledThemes', []); - if ($this->appManager->isEnabledForUser('theming') && class_exists('\OCA\Theming\Service\ThemesService')) { - $themesService = Server::get(\OCA\Theming\Service\ThemesService::class); - $page->assign('enabledThemes', $themesService->getEnabledThemes()); - } - $page->assign('user_displayname', $userDisplayName); $page->assign('user_uid', \OC_User::getUser()); break; @@ -200,15 +194,14 @@ class TemplateLayout { // Set body data-theme try { $themesService = Server::get(\OCA\Theming\Service\ThemesService::class); - } catch (\OCP\AppFramework\QueryException) { + } catch (\Exception) { $themesService = null; } - $page->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []); if ($this->config->getSystemValueBool('installed', false)) { if (empty(self::$versionHash)) { - $v = $this->appManager->getAppInstalledVersions(); + $v = $this->appManager->getAppInstalledVersions(true); $v['core'] = implode('.', $this->serverVersion->getVersion()); self::$versionHash = substr(md5(implode(',', $v)), 0, 8); } |