aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-04-23 22:57:12 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2025-04-23 22:57:12 +0200
commit8503ce8968390863f7c91b8cdc7609ca0e1a8128 (patch)
tree82072f78974b4d348359de5a8ed92ac7394c4f80
parent56b9974c419f797d85b9e48d1402374e6cfacfb6 (diff)
downloadnextcloud-server-fix/harden-template-functions.tar.gz
nextcloud-server-fix/harden-template-functions.zip
fix(Template): harden enabled-theme logicfix/harden-template-functions
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--lib/private/TemplateLayout.php9
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)) {