summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-01-05 20:29:03 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-06 09:42:39 +0100
commit7b8c777b5728cf4f4296a67950f965f011932183 (patch)
treecc9e87f69beb1a147e4bb9abaa000220da16f7a1 /lib/private/Template
parent8bcad88c6fbbd95aa5d7bfe2a363997229b464ab (diff)
downloadnextcloud-server-7b8c777b5728cf4f4296a67950f965f011932183.tar.gz
nextcloud-server-7b8c777b5728cf4f4296a67950f965f011932183.zip
Fix css url prefix for IgnoreFrontController enabled configs
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Template')
-rw-r--r--lib/private/Template/SCSSCacher.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index e19640e067a..0c1711b9fb7 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -164,7 +164,12 @@ class SCSSCacher {
*/
private function rebaseUrls($css, $webDir) {
$re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x';
- $subst = 'url(\'../../../'.$webDir.'/$1\')';
+ // OC\Route\Router:75
+ if(($this->systemConfig->getValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
+ $subst = 'url(\'../../'.$webDir.'/$1\')';
+ } else {
+ $subst = 'url(\'../../../'.$webDir.'/$1\')';
+ }
return preg_replace($re, $subst, $css);
}