mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
parent
6f26df60f3
commit
c624921792
@ -28,11 +28,12 @@
|
|||||||
|
|
||||||
namespace Icinga\Web;
|
namespace Icinga\Web;
|
||||||
|
|
||||||
use \Zend_Controller_Front;
|
use \Exception;
|
||||||
use \RecursiveDirectoryIterator;
|
use \RecursiveDirectoryIterator;
|
||||||
use \RecursiveIteratorIterator;
|
use \RecursiveIteratorIterator;
|
||||||
use \RegexIterator;
|
use \RegexIterator;
|
||||||
use \RecursiveRegexIterator;
|
use \RecursiveRegexIterator;
|
||||||
|
use \Zend_Controller_Front;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Less compiler prints files or directories to stdout
|
* Less compiler prints files or directories to stdout
|
||||||
@ -93,7 +94,15 @@ class LessCompiler
|
|||||||
if ($ext === 'css') {
|
if ($ext === 'css') {
|
||||||
readfile($file);
|
readfile($file);
|
||||||
} elseif ($ext === 'less') {
|
} elseif ($ext === 'less') {
|
||||||
|
try {
|
||||||
echo $this->lessc->compileFile($file);
|
echo $this->lessc->compileFile($file);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo '/* ' . PHP_EOL . ' ===' . PHP_EOL;
|
||||||
|
echo ' Error in file ' . $file . PHP_EOL;
|
||||||
|
echo ' ' . $e->getMessage() . PHP_EOL . PHP_EOL;
|
||||||
|
echo ' ' . 'This file was dropped cause of errors.' . PHP_EOL;
|
||||||
|
echo ' ===' . PHP_EOL . '*/' . PHP_EOL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user