From: John Molakvoæ (skjnldsv) Date: Thu, 5 Jan 2017 19:29:03 +0000 (+0100) Subject: Fix css url prefix for IgnoreFrontController enabled configs X-Git-Tag: v12.0.0beta1~732^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b8c777b5728cf4f4296a67950f965f011932183;p=nextcloud-server.git Fix css url prefix for IgnoreFrontController enabled configs Signed-off-by: John Molakvoæ (skjnldsv) --- 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); }