diff options
Diffstat (limited to 'lib/private/Template/SCSSCacher.php')
-rw-r--r-- | lib/private/Template/SCSSCacher.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index 744ea80761e..b55cd0b93b0 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -46,17 +46,26 @@ class SCSSCacher { /** @var SystemConfig */ protected $systemConfig; + /** @var string */ + protected $serverRoot; + /** * @param ILogger $logger * @param IAppData $appData * @param IURLGenerator $urlGenerator * @param SystemConfig $systemConfig + * @param string $serverRoot */ - public function __construct(ILogger $logger, IAppData $appData, IURLGenerator $urlGenerator, SystemConfig $systemConfig) { + public function __construct(ILogger $logger, + IAppData $appData, + IURLGenerator $urlGenerator, + SystemConfig $systemConfig, + $serverRoot) { $this->logger = $logger; $this->appData = $appData; $this->urlGenerator = $urlGenerator; $this->systemConfig = $systemConfig; + $this->serverRoot = $serverRoot; } /** @@ -74,9 +83,7 @@ class SCSSCacher { $path = implode('/', $path); - $webDir = explode('/', $file); - array_pop($webDir); - $webDir = implode('/', $webDir); + $webDir = substr($path, strlen($this->serverRoot)+1); try { $folder = $this->appData->getFolder($app); |