Reduce length of md5 in scss caching

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-12-14 08:51:53 +01:00
parent 1f108970c4
commit f2d5927ea3
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
1 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ class SCSSCacher {
$re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x';
// OC\Route\Router:75
if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
$subst = 'url(\'../../'.$webDir.'/$1\')';
$subst = 'url(\'../../'.$webDir.'/$1\')';
} else {
$subst = 'url(\'../../../'.$webDir.'/$1\')';
}
@ -313,6 +313,6 @@ class SCSSCacher {
*/
private function prependBaseurlPrefix($cssFile) {
$frontendController = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
return md5($this->urlGenerator->getBaseUrl() . $frontendController) . '-' . $cssFile;
return substr(md5($this->urlGenerator->getBaseUrl() . $frontendController), 0, 8) . '-' . $cssFile;
}
}