summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-07-10 17:52:31 +0200
committerJulius Härtl <jus@bitgrid.net>2018-07-19 08:16:59 +0200
commit6ed8c19ab9dbc37a3f1563f51d0375d1b5f3e108 (patch)
treeb88cb43536e6fd48a934d28c5cb1a5e2f4217b1a /lib/private/Template
parent61946819baa1cb94b5f89330b739653b8231c7ed (diff)
downloadnextcloud-server-6ed8c19ab9dbc37a3f1563f51d0375d1b5f3e108.tar.gz
nextcloud-server-6ed8c19ab9dbc37a3f1563f51d0375d1b5f3e108.zip
Use proper URL prefix for icons
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Template')
-rw-r--r--lib/private/Template/SCSSCacher.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index 269daf5556d..9dcedb94daf 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -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;
}
/**