diff --git a/library/Icinga/Application/webrouter.php b/library/Icinga/Application/webrouter.php index 9eb5bf6f8..47210808e 100644 --- a/library/Icinga/Application/webrouter.php +++ b/library/Icinga/Application/webrouter.php @@ -56,12 +56,10 @@ if (in_array($path, $special)) { switch ($path) { case 'css/icinga.css': - $forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']); - Stylesheet::send(false, $forIe11); + Stylesheet::send(); exit; case 'css/icinga.min.css': - $forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']); - Stylesheet::send(true, $forIe11); + Stylesheet::send(true); exit; case 'js/icinga.dev.js': diff --git a/library/Icinga/Util/LessParser.php b/library/Icinga/Util/LessParser.php index 946b3f686..46aa061f5 100644 --- a/library/Icinga/Util/LessParser.php +++ b/library/Icinga/Util/LessParser.php @@ -10,14 +10,8 @@ require_once 'lessphp/lessc.inc.php'; class LessParser extends lessc { - /** - * @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject - * light mode calls - */ - public function __construct($disableModes = false) + public function __construct() { - if (! $disableModes) { - $this->setOption('plugins', [new Visitor()]); - } + $this->setOption('plugins', [new Visitor()]); } } diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php index a47ca95af..1f72560bb 100644 --- a/library/Icinga/Web/LessCompiler.php +++ b/library/Icinga/Web/LessCompiler.php @@ -58,13 +58,10 @@ class LessCompiler /** * Create a new LESS compiler - * - * @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject - * light mode calls */ - public function __construct($disableModes = false) + public function __construct() { - $this->lessc = new LessParser($disableModes); + $this->lessc = new LessParser(); // Discourage usage of import because we're caching based on an explicit list of LESS files to compile $this->lessc->importDisabled = true; } diff --git a/library/Icinga/Web/StyleSheet.php b/library/Icinga/Web/StyleSheet.php index 02087302d..2b46b5d35 100644 --- a/library/Icinga/Web/StyleSheet.php +++ b/library/Icinga/Web/StyleSheet.php @@ -106,15 +106,12 @@ class StyleSheet /** * Create the StyleSheet - * - * @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject - * light mode calls */ - public function __construct($disableModes = false) + public function __construct() { $app = Icinga::app(); $this->app = $app; - $this->lessCompiler = new LessCompiler($disableModes); + $this->lessCompiler = new LessCompiler(); $this->pubPath = $app->getBaseDir('public'); $this->collect(); } @@ -224,13 +221,11 @@ class StyleSheet * * Does not cache the stylesheet if the HTTP header Cache-Control or Pragma is set to no-cache. * - * @param bool $minified Whether to compress the stylesheet - * @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject - * light mode calls + * @param bool $minified Whether to compress the stylesheet */ - public static function send($minified = false, $disableModes = false) + public static function send($minified = false) { - $styleSheet = new self($disableModes); + $styleSheet = new self(); $request = $styleSheet->app->getRequest(); $response = $styleSheet->app->getResponse();