From 492a9ec22963f29738af5f54bfc6dc900c353fe9 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Fri, 18 Jun 2021 12:36:24 +0200 Subject: [PATCH] Auth: Reload CSS if mode change --- library/Icinga/Authentication/Auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/Auth.php b/library/Icinga/Authentication/Auth.php index adcb9935f..fa5b52868 100644 --- a/library/Icinga/Authentication/Auth.php +++ b/library/Icinga/Authentication/Auth.php @@ -104,9 +104,10 @@ class Auth // Reload CSS if the theme changed $themingConfig = Icinga::app()->getConfig()->getSection('themes'); $userTheme = $user->getPreferences()->getValue('icingaweb', 'theme'); + $themeMode = $user->getPreferences()->getValue('icingaweb', 'theme_mode'); if (! (bool) $themingConfig->get('disabled', false) && $userTheme !== null) { $defaultTheme = $themingConfig->get('default', StyleSheet::DEFAULT_THEME); - if ($userTheme !== $defaultTheme) { + if (($userTheme !== $defaultTheme) || ($themeMode !== StyleSheet::DEFAULT_MODE)) { $this->getResponse()->setReloadCss(true); } }