Use proper URL prefix for icons

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-07-10 17:52:31 +02:00
parent 61946819ba
commit 6ed8c19ab9
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 10 additions and 3 deletions

View File

@ -257,7 +257,7 @@ class SCSSCacher {
// Compile
try {
$compiledScss = $scss->compile(
'$webroot: \'' . \OC::$WEBROOT . '\';' .
'$webroot: \'' . $this->getRoutePrefix() . '\';' .
'@import "variables.scss";' .
'@import "functions.scss";' .
$this->getInjectedVariables() .
@ -371,9 +371,16 @@ class SCSSCacher {
* @return string
*/
private function prependBaseurlPrefix(string $cssFile): string {
$frontendController = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
return substr(md5($this->urlGenerator->getBaseUrl() . $this->getRoutePrefix()), 0, 4) . '-' . $cssFile;
}
return substr(md5($this->urlGenerator->getBaseUrl() . $frontendController), 0, 4) . '-' . $cssFile;
private function getRoutePrefix() {
$frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
$prefix = \OC::$WEBROOT . '/index.php';
if ($frontControllerActive) {
$prefix = \OC::$WEBROOT;
}
return $prefix;
}
/**