From 9fc1a692045d3797345f96cafea3db3baefaa282 Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Tue, 2 Jan 2024 19:26:44 -0500 Subject: [PATCH] always load custom palettes too --- src/Html.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Html.php b/src/Html.php index 5d413dce73a..ececd9fffd5 100644 --- a/src/Html.php +++ b/src/Html.php @@ -1203,10 +1203,15 @@ public static function includeHeader( } $tpl_vars['css_files'][] = ['path' => 'public/lib/tabler.css']; $tpl_vars['css_files'][] = ['path' => 'css/glpi.scss']; - if ($theme->isCustomTheme()) { + $tpl_vars['css_files'][] = ['path' => 'css/core_palettes.scss']; + foreach (ThemeManager::getInstance()->getAllThemes() as $info) { + if (!$info->isCustomTheme()) { + continue; + } + $theme_path = $info->getKey() . '?is_custom_theme=1'; + // Custom theme files might be modified by external source + $theme_path .= "&lastupdate=" . filemtime($info->getPath(false)); $tpl_vars['css_files'][] = ['path' => $theme_path]; - } else { - $tpl_vars['css_files'][] = ['path' => 'css/core_palettes.scss']; } // Add specific meta tags for plugins