diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-04-24 07:38:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-24 07:38:20 +0200 |
commit | 9fce0f9297d011165af4fe3fceeb85586177d912 (patch) | |
tree | c2dca38819798456a90dba611d079d6ddcd1694a | |
parent | 1cc990358ca04371e9f54b936e8850cb5e39d665 (diff) | |
parent | 8503ce8968390863f7c91b8cdc7609ca0e1a8128 (diff) | |
download | nextcloud-server-9fce0f9297d011165af4fe3fceeb85586177d912.tar.gz nextcloud-server-9fce0f9297d011165af4fe3fceeb85586177d912.zip |
Merge pull request #52391 from nextcloud/fix/harden-template-functions
fix(Template): harden enabled-theme logic
-rw-r--r-- | lib/private/TemplateLayout.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 374972ece22..caffbfceefa 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,10 +194,9 @@ 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)) { |