Stylesheet: Disable extendend @import statements provided by LESS

fixes #9687
This commit is contained in:
Johannes Meyer 2015-07-22 12:45:10 +02:00
parent c5d68995ec
commit a199d36207
2 changed files with 12 additions and 3 deletions

View File

@ -8,7 +8,6 @@ use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use RegexIterator;
use RecursiveRegexIterator;
use Zend_Controller_Front;
use Icinga\Application\Icinga;
use lessc;
@ -31,8 +30,6 @@ class LessCompiler
*/
private $lessc;
private $baseUrl;
private $source;
/**
@ -44,6 +41,17 @@ class LessCompiler
$this->lessc = new lessc();
}
/**
* Disable the extendend import functionality
*
* @return $this
*/
public function disableExtendedImport()
{
$this->lessc->importDisabled = true;
return $this;
}
public function compress()
{
$this->lessc->setPreserveComments(false);

View File

@ -99,6 +99,7 @@ class StyleSheet
}
$less = new LessCompiler();
$less->disableExtendedImport();
foreach ($lessFiles as $file) {
$less->addFile($file);
}