From 2e24833d7cb474ec9614f44496bcf3e589f386af Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Fri, 14 Oct 2016 08:06:05 +0200 Subject: [PATCH 1/3] LessCompiler: Remove error message when switching to Icinga theme fixes #12660 --- library/Icinga/Web/LessCompiler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php index 7ec34a143..0419e1518 100644 --- a/library/Icinga/Web/LessCompiler.php +++ b/library/Icinga/Web/LessCompiler.php @@ -122,7 +122,9 @@ class LessCompiler if (is_file($theme) && is_readable($theme)) { $this->theme = $theme; } else { - Logger::error('Can\t load theme %s. Make sure that the theme exists and is readable', $theme); + if ($theme !== '/vagrant/public/css/themes/Icinga.less') { + Logger::error('Can\t load theme %s. Make sure that the theme exists and is readable', $theme); + } } return $this; } From 8294471253e58331662759a609b3da730e9f311c Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Fri, 14 Oct 2016 09:39:24 +0200 Subject: [PATCH 2/3] Revert "LessCompiler: Remove error message when switching to Icinga theme" This reverts commit 2e24833d7cb474ec9614f44496bcf3e589f386af. --- library/Icinga/Web/LessCompiler.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php index 0419e1518..7ec34a143 100644 --- a/library/Icinga/Web/LessCompiler.php +++ b/library/Icinga/Web/LessCompiler.php @@ -122,9 +122,7 @@ class LessCompiler if (is_file($theme) && is_readable($theme)) { $this->theme = $theme; } else { - if ($theme !== '/vagrant/public/css/themes/Icinga.less') { - Logger::error('Can\t load theme %s. Make sure that the theme exists and is readable', $theme); - } + Logger::error('Can\t load theme %s. Make sure that the theme exists and is readable', $theme); } return $this; } From 0cd2d98f71fba8b086ab27941632005b9eef181e Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Fri, 14 Oct 2016 13:24:17 +0200 Subject: [PATCH 3/3] StyleSheet: Don't try to load the icinga default theme refs #12660 --- library/Icinga/Web/StyleSheet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/StyleSheet.php b/library/Icinga/Web/StyleSheet.php index 8a7ffa3e5..549e11c5c 100644 --- a/library/Icinga/Web/StyleSheet.php +++ b/library/Icinga/Web/StyleSheet.php @@ -127,7 +127,7 @@ class StyleSheet } } - if ($theme) { + if ($theme && $theme !== self::DEFAULT_THEME) { if (($pos = strpos($theme, '/')) !== false) { $moduleName = substr($theme, 0, $pos); $theme = substr($theme, $pos + 1);