Enforce sane values for the theme color
authorAlexander Ebert <ebert@woltlab.com>
Wed, 18 Oct 2023 16:43:46 +0000 (18:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 18 Oct 2023 16:43:46 +0000 (18:43 +0200)
wcfsetup/install/files/lib/data/style/Style.class.php

index a9349f8d82823e815a357ac9b0e6256901dc02e3..91dda8b291ee10c890027865269f32eb8b2b274e 100644 (file)
@@ -214,11 +214,9 @@ class Style extends DatabaseObject
             }
         }
 
-        // see https://github.com/WoltLab/WCF/issues/2636
-        if (empty($this->variables['wcfPageThemeColor'])) {
-            $this->variables['wcfPageThemeColor'] = $this->variables['wcfHeaderBackground'];
-        }
-        if ($this->hasDarkMode && empty($this->variables[self::DARK_MODE_PREFIX . 'wcfPageThemeColor'])) {
+        // The theme color implicitly matches the header background color.
+        $this->variables['wcfPageThemeColor'] = $this->variables['wcfHeaderBackground'];
+        if ($this->hasDarkMode) {
             $this->variables[self::DARK_MODE_PREFIX . 'wcfPageThemeColor'] = $this->variables[self::DARK_MODE_PREFIX . 'wcfHeaderBackground'];
         }