[icinga-checkins] icinga.org: icingaweb2/master: LessCompiler: fix #layout usage in module CSS

git at icinga.org git at icinga.org
Wed Feb 17 18:26:10 CET 2016


Module: icingaweb2
Branch: master
Commit: 97b5800f32367f2d9b73b238d2903b2fd727ffaf
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=97b5800f32367f2d9b73b238d2903b2fd727ffaf

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 17 18:25:43 2016 +0100

LessCompiler: fix #layout usage in module CSS

---

 library/Icinga/Web/LessCompiler.php |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php
index 3ec48c5..acf616d 100644
--- a/library/Icinga/Web/LessCompiler.php
+++ b/library/Icinga/Web/LessCompiler.php
@@ -155,18 +155,16 @@ class LessCompiler
             $moduleCss .= '}';
         }
 
-        $moduleCss = preg_replace(
-            '/(\.icinga-module\.module-[^\s]+) (#layout\.[^\s]+)/m',
-            '\2 \1',
-            $moduleCss
-        );
-
         $this->source .= $moduleCss;
 
         if ($this->theme !== null) {
             $this->source .= file_get_contents($this->theme);
         }
 
-        return $this->lessc->compile($this->source);
+        return preg_replace(
+            '/(\.icinga-module\.module-[^\s]+) (#layout\.[^\s]+)/m',
+            '\2 \1',
+            $this->lessc->compile($this->source)
+        );
     }
 }



More information about the icinga-checkins mailing list