getParsedBodyParam('set_theme'); if (! $GLOBALS['cfg']['ThemeManager'] || ! is_string($theme) || $theme === '') { $this->response->header('Location: index.php?route=/' . Url::getCommonRaw([], '&')); return; } $this->themeManager->setActiveTheme($theme); /** @var mixed $themeColorMode */ $themeColorMode = $request->getParsedBodyParam('themeColorMode'); if (is_string($themeColorMode) && $themeColorMode !== '') { $this->themeManager->theme->setColorMode($themeColorMode); } $this->themeManager->setThemeCookie(); $preferences = $this->userPreferences->load(); $preferences['config_data']['ThemeDefault'] = $theme; $this->userPreferences->save($preferences['config_data']); $this->response->header('Location: index.php?route=/' . Url::getCommonRaw([], '&')); } }