diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index 6a41c4db8b972..19734355d26f3 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -388,7 +388,11 @@ public function getCachedSCSS(string $appName, string $fileName): string { $fileName = array_pop($tmpfileLoc); $fileName = $this->prependVersionPrefix($this->prependBaseurlPrefix(str_replace('.scss', '.css', $fileName)), $appName); - return substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['fileName' => $fileName, 'appName' => $appName]), strlen(\OC::$WEBROOT) + 1); + return substr($this->urlGenerator->linkToRoute('core.Css.getCss', [ + 'fileName' => $fileName, + 'appName' => $appName, + 'v' => $this->config->getAppValue('core', 'scss.variables', '0') + ]), \strlen(\OC::$WEBROOT) + 1); } /** diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 2389d8ec881ad..d84b96773bcdf 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -458,7 +458,8 @@ public function testGetCachedSCSS($appName, $fileName, $result, $version) { ->with('core.Css.getCss', [ 'fileName' => substr(md5($version), 0, 4) . '-' . substr(md5('http://localhost/nextcloud/index.php'), 0, 4) . '-styles.css', - 'appName' => $appName + 'appName' => $appName, + 'v' => 0, ]) ->willReturn(\OC::$WEBROOT . $result); $actual = $this->scssCacher->getCachedSCSS($appName, $fileName);