summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 20:33:21 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2018-12-21 09:33:18 +0000
commit77a81d00cf9725e87bbb153962773eca695ba0c6 (patch)
tree2a1396b20f3100ec9f53d9244b8b4a075f3297b3
parent6a618ebd8b124a7fcccf94693a1acdcfa27ecb4b (diff)
downloadnextcloud-server-77a81d00cf9725e87bbb153962773eca695ba0c6.tar.gz
nextcloud-server-77a81d00cf9725e87bbb153962773eca695ba0c6.zip
SCSS cache buster is a combination of apps/theming/scc_vars
Else on scss files we'd get <file>?v=<hash>?v=<hash2> This is of course not valid. Now it becomes <file>?v=<hash>-<hash2> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/TemplateLayout.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index cbadf1df53f..284f14c5db4 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -210,7 +210,14 @@ class TemplateLayout extends \OC_Template {
if (substr($file, -strlen('print.css')) === 'print.css') {
$this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
} else {
- $this->append( 'cssfiles', $web.'/'.$file . $this->getVersionHashSuffix($web, $file) );
+ $suffix = $this->getVersionHashSuffix($web, $file);
+
+ if (strpos($file, '?v=') == false) {
+ $this->append( 'cssfiles', $web.'/'.$file . $suffix);
+ } else {
+ $this->append( 'cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
+ }
+
}
}
}