Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/Service/ThemesService.php')
-rw-r--r--apps/theming/lib/Service/ThemesService.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php
index 43977721e76..283b2e9c9ee 100644
--- a/apps/theming/lib/Service/ThemesService.php
+++ b/apps/theming/lib/Service/ThemesService.php
@@ -155,8 +155,14 @@ class ThemesService {
return [];
}
+ $enforcedTheme = $this->config->getSystemValueString('enforce_theme', '');
+ $enabledThemes = json_decode($this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', '[]'));
+ if ($enforcedTheme !== '') {
+ return array_merge([$enforcedTheme], $enabledThemes);
+ }
+
try {
- return json_decode($this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', '[]'));
+ return $enabledThemes;
} catch (\Exception $e) {
return [];
}