Skip to content
Snippets Groups Projects
Unverified Commit f2d5927e authored by John Molakvoæ's avatar John Molakvoæ
Browse files

Reduce length of md5 in scss caching

parent 1f108970
No related branches found
No related tags found
No related merge requests found
...@@ -285,7 +285,7 @@ class SCSSCacher { ...@@ -285,7 +285,7 @@ class SCSSCacher {
$re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; $re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x';
// OC\Route\Router:75 // OC\Route\Router:75
if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
$subst = 'url(\'../../'.$webDir.'/$1\')'; $subst = 'url(\'../../'.$webDir.'/$1\')';
} else { } else {
$subst = 'url(\'../../../'.$webDir.'/$1\')'; $subst = 'url(\'../../../'.$webDir.'/$1\')';
} }
...@@ -313,6 +313,6 @@ class SCSSCacher { ...@@ -313,6 +313,6 @@ class SCSSCacher {
*/ */
private function prependBaseurlPrefix($cssFile) { private function prependBaseurlPrefix($cssFile) {
$frontendController = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'); $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;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment