Skip to content

Commit 9b43461

Browse files
committed
Reduce length of md5 in scss caching
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent ce12763 commit 9b43461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/Template/SCSSCacher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private function rebaseUrls($css, $webDir) {
285285
$re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x';
286286
// OC\Route\Router:75
287287
if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
288-
$subst = 'url(\'../../'.$webDir.'/$1\')';
288+
$subst = 'url(\'../../'.$webDir.'/$1\')';
289289
} else {
290290
$subst = 'url(\'../../../'.$webDir.'/$1\')';
291291
}
@@ -313,6 +313,6 @@ public function getCachedSCSS($appName, $fileName) {
313313
*/
314314
private function prependBaseurlPrefix($cssFile) {
315315
$frontendController = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
316-
return md5($this->urlGenerator->getBaseUrl() . $frontendController) . '-' . $cssFile;
316+
return substr(md5($this->urlGenerator->getBaseUrl() . $frontendController), 0, 8) . '-' . $cssFile;
317317
}
318318
}

0 commit comments

Comments
 (0)