aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/ThemingDefaults.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r--apps/theming/lib/ThemingDefaults.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 04ec22fe700..39e7d88de0d 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -261,7 +261,13 @@ class ThemingDefaults extends \OC_Defaults {
}
// Fall back to background color
- return $this->getDefaultColorBackground();
+ $defaultColor = $this->config->getAppValue(Application::APP_ID, 'background_color', '');
+ if (preg_match('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i', $defaultColor)) {
+ return $defaultColor;
+ }
+
+ // worst case fall back to default primary color
+ return BackgroundService::DEFAULT_COLOR;
}
/**
@@ -270,7 +276,7 @@ class ThemingDefaults extends \OC_Defaults {
public function getDefaultColorBackground(): string {
$defaultColor = $this->config->getAppValue(Application::APP_ID, 'background_color', '');
if (!preg_match('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i', $defaultColor)) {
- $defaultColor = BackgroundService::DEFAULT_COLOR;
+ $defaultColor = BackgroundService::DEFAULT_BACKGROUND_COLOR;
}
return $defaultColor;
}