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-07-02 14:03:35 +0200
commit3801c3aa3f23e5793a12eb8ae62355036d69b917 (patch)
treecbbc00998d2fdf0a895153cce60bf66ddf8b45f9 /lib/private/Template
parentf02575db94e719e12db220c9c634d65c555f7361 (diff)
downloadnextcloud-server-3801c3aa3f23e5793a12eb8ae62355036d69b917.tar.gz
nextcloud-server-3801c3aa3f23e5793a12eb8ae62355036d69b917.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());
+ }
}