Fixed style compiler
authorAlexander Ebert <ebert@woltlab.com>
Sat, 24 Oct 2015 18:24:58 +0000 (20:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 24 Oct 2015 18:24:58 +0000 (20:24 +0200)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index 09d47bfa9e2ef1b5ef8f255ef51d334f4e98330e..b728974a52e774f43e8594e73858a02ff9aaccde 100644 (file)
@@ -52,7 +52,7 @@ class StyleCompiler extends SingletonFactory {
        public function compile(Style $style) {
                // read stylesheets by dependency order
                $conditions = new PreparedStatementConditionBuilder();
-               $conditions->add("filename REGEXP ?", ['style/([a-zA-Z0-9\_\-\.]+)\.(less|scss)']);
+               $conditions->add("filename REGEXP ?", ['style/([a-zA-Z0-9\_\-\.]+)\.scss']);
                
                // TESTING ONLY
                $conditions->add("packageID <> ?", [1]);
@@ -77,7 +77,7 @@ class StyleCompiler extends SingletonFactory {
                                $file = WCF_DIR."style/{$file}/";
                                if ($innerHandle = opendir($file)) {
                                        while (($innerFile = readdir($innerHandle)) !== false) {
-                                               if ($innerFile === '.' || $innerFile === '..' || !is_file($file.$innerFile) || preg_match('~\.less$~', $innerFile)) {
+                                               if ($innerFile === '.' || $innerFile === '..' || !is_file($file.$innerFile) || !preg_match('~^[a-zA-Z]+\.scss~$', $innerFile)) {
                                                        continue;
                                                }
                                                
@@ -139,7 +139,7 @@ class StyleCompiler extends SingletonFactory {
        public function compileACP() {
                // read stylesheets by dependency order
                $conditions = new PreparedStatementConditionBuilder();
-               $conditions->add("filename REGEXP ?", ['style/([a-zA-Z0-9\_\-\.]+)\.(less|scss)']);
+               $conditions->add("filename REGEXP ?", ['style/([a-zA-Z0-9\_\-\.]+)\.scss']);
                
                // TESTING ONLY
                $conditions->add("packageID <> ?", [1]);
@@ -164,7 +164,7 @@ class StyleCompiler extends SingletonFactory {
                                $file = WCF_DIR."style/{$file}/";
                                if ($innerHandle = opendir($file)) {
                                        while (($innerFile = readdir($innerHandle)) !== false) {
-                                               if ($innerFile === '.' || $innerFile === '..' || !is_file($file.$innerFile) || preg_match('~\.less$~', $innerFile)) {
+                                               if ($innerFile === '.' || $innerFile === '..' || !is_file($file.$innerFile) || !preg_match('~^[a-zA-Z]+\.scss~$', $innerFile)) {
                                                        continue;
                                                }