diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-20 20:33:21 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-20 20:33:21 +0100 |
commit | 216ad29f05d5d527b7343ff4b764565d54c5a21a (patch) | |
tree | 55fd6896189e659a3bee0039f8054963da85d27e /lib/private/TemplateLayout.php | |
parent | 4b0cb0df7f3f68fa9438d3b76ce427aa05a09979 (diff) | |
download | nextcloud-server-216ad29f05d5d527b7343ff4b764565d54c5a21a.tar.gz nextcloud-server-216ad29f05d5d527b7343ff4b764565d54c5a21a.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>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 9 |
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)); + } + } } } |