Fixed @import within LESS
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 16:02:40 +0000 (17:02 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 16:02:40 +0000 (17:02 +0100)
wcfsetup/install/files/lib/page/LessStylesheetsPage.class.php

index d2f76627d7bed4a10f55cb679f7bbb18883c538c..c2645b64c4e72b1e132952f48aa68413d7302b1b 100644 (file)
@@ -19,6 +19,7 @@ class LessStylesheetsPage extends AbstractPage {
                                        $application = new Application(1);
                                        $absolutePath = $application->domainName . $application->domainPath;
                                        $content = preg_replace('~url\(\'..\/~', 'url(\''.$absolutePath, $content);
+                                       $content = preg_replace('~@import "([a-zA-Z]+)\.less";~', '@import "' . $absolutePath . 'style/$1.less";', $content);
                                        
                                        echo $content;
                                }