diff options
author | Julius Härtl <jus@bitgrid.net> | 2017-06-15 12:35:16 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-07-02 14:03:35 +0200 |
commit | 3801c3aa3f23e5793a12eb8ae62355036d69b917 (patch) | |
tree | cbbc00998d2fdf0a895153cce60bf66ddf8b45f9 /lib/private/Template | |
parent | f02575db94e719e12db220c9c634d65c555f7361 (diff) | |
download | nextcloud-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.php | 8 |
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()); + } } |