From 216ad29f05d5d527b7343ff4b764565d54c5a21a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 20 Dec 2018 20:33:21 +0100 Subject: SCSS cache buster is a combination of apps/theming/scc_vars Else on scss files we'd get ?v=?v= This is of course not valid. Now it becomes ?v=- Signed-off-by: Roeland Jago Douma --- lib/private/TemplateLayout.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/private/TemplateLayout.php') 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)); + } + } } } -- cgit v1.2.3