mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Stylesheet: Disable extendend @import statements provided by LESS
fixes #9687
This commit is contained in:
parent
c5d68995ec
commit
a199d36207
@ -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);
|
||||
|
@ -99,6 +99,7 @@ class StyleSheet
|
||||
}
|
||||
|
||||
$less = new LessCompiler();
|
||||
$less->disableExtendedImport();
|
||||
foreach ($lessFiles as $file) {
|
||||
$less->addFile($file);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user