summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2017-06-15 12:35:16 +0200
committerJulius Härtl <jus@bitgrid.net>2017-06-15 12:46:24 +0200
commit0789adaf95d2cfea8d661812b7dd964b0611495b (patch)
tree1837c8826c3b20fa78c5e3a9d4b42202974923b2 /lib/private/Template
parentca3c69c8ae0fd7f0d13e87d7861c54e2950a2c09 (diff)
downloadnextcloud-server-0789adaf95d2cfea8d661812b7dd964b0611495b.tar.gz
nextcloud-server-0789adaf95d2cfea8d661812b7dd964b0611495b.zip
Make cache and scss caching depend on the baseUrl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Template')
-rw-r--r--lib/private/Template/SCSSCacher.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index 6b1c594bd2e..eccc65a5cc9 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -92,7 +92,7 @@ class SCSSCacher {
$path = explode('/', $root . '/' . $file);
$fileNameSCSS = array_pop($path);
- $fileNameCSS = str_replace('.scss', '.css', $fileNameSCSS);
+ $fileNameCSS = $this->getBaseUrlHash() . '-' . str_replace('.scss', '.css', $fileNameSCSS);
$path = implode('/', $path);
@@ -292,8 +292,12 @@ class SCSSCacher {
public function getCachedSCSS($appName, $fileName) {
$tmpfileLoc = explode('/', $fileName);
$fileName = array_pop($tmpfileLoc);
- $fileName = str_replace('.scss', '.css', $fileName);
+ $fileName = $this->getBaseUrlHash() . '-' . str_replace('.scss', '.css', $fileName);
return substr($this->urlGenerator->linkToRoute('core.Css.getCss', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1);
}
+
+ private function getBaseUrlHash() {
+ return md5($this->urlGenerator->getBaseUrl());
+ }
}