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>
This commit is contained in:
Roeland Jago Douma 2018-12-20 20:33:21 +01:00
parent 4b0cb0df7f
commit 216ad29f05
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 8 additions and 1 deletions

View File

@ -210,7 +210,14 @@ class TemplateLayout extends \OC_Template {
if (substr($file, -strlen('print.css')) === 'print.css') { if (substr($file, -strlen('print.css')) === 'print.css') {
$this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); $this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
} else { } 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));
}
} }
} }
} }