summaryrefslogtreecommitdiffstats
path: root/lib/private/Template/SCSSCacher.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-16 22:51:31 -0600
committerGitHub <noreply@github.com>2017-03-16 22:51:31 -0600
commitead9a10cc528beb265282049cab2462020660714 (patch)
treee5c0745fe3201eb0a56773f4b5ba4f5945881a81 /lib/private/Template/SCSSCacher.php
parent5683365a2cc605cbaf41290e4cdfde7028f9014a (diff)
parentf86b5c2ebba9aaa76bbcc1dfc660f430b246d1a4 (diff)
downloadnextcloud-server-ead9a10cc528beb265282049cab2462020660714.tar.gz
nextcloud-server-ead9a10cc528beb265282049cab2462020660714.zip
Merge pull request #3619 from nextcloud/fix-scss-for-apps
Fix SCSS usage in apps
Diffstat (limited to 'lib/private/Template/SCSSCacher.php')
-rw-r--r--lib/private/Template/SCSSCacher.php15
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);