diff options
author | Julius Haertl <jus@bitgrid.net> | 2017-03-05 23:28:59 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-03-20 12:49:08 +0100 |
commit | 4fbf9a4feb15a7001886d86285eb4da42b13927b (patch) | |
tree | 5611774d44e6623428cd48feee7f72c148cfb826 /lib/private/Template | |
parent | 7381a2ec5c4d2fa5324e8927e81f858b11005ce7 (diff) | |
download | nextcloud-server-4fbf9a4feb15a7001886d86285eb4da42b13927b.tar.gz nextcloud-server-4fbf9a4feb15a7001886d86285eb4da42b13927b.zip |
Add tests for SCSSCacher
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Template')
-rw-r--r-- | lib/private/Template/SCSSCacher.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index c02d2c67279..3aa649da65a 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -29,6 +29,7 @@ use OC\SystemConfig; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFolder; +use OCP\IConfig; use OCP\ILogger; use OCP\IURLGenerator; @@ -43,8 +44,8 @@ class SCSSCacher { /** @var IURLGenerator */ protected $urlGenerator; - /** @var SystemConfig */ - protected $systemConfig; + /** @var IConfig */ + protected $config; /** @var string */ protected $serverRoot; @@ -59,12 +60,12 @@ class SCSSCacher { public function __construct(ILogger $logger, IAppData $appData, IURLGenerator $urlGenerator, - SystemConfig $systemConfig, + IConfig $config, $serverRoot) { $this->logger = $logger; $this->appData = $appData; $this->urlGenerator = $urlGenerator; - $this->systemConfig = $systemConfig; + $this->config = $config; $this->serverRoot = $serverRoot; } @@ -162,7 +163,7 @@ class SCSSCacher { $path, \OC::$SERVERROOT . '/core/css/', ]); - if($this->systemConfig->getValue('debug')) { + if($this->config->getSystemValue('debug')) { // Debug mode $scss->setFormatter(Expanded::class); $scss->setLineNumberStyle(Compiler::LINE_COMMENTS); @@ -213,7 +214,7 @@ class SCSSCacher { private function rebaseUrls($css, $webDir) { $re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; // OC\Route\Router:75 - if(($this->systemConfig->getValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { + if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { $subst = 'url(\'../../'.$webDir.'/$1\')'; } else { $subst = 'url(\'../../../'.$webDir.'/$1\')'; |