]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix css url prefix for IgnoreFrontController enabled configs
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 5 Jan 2017 19:29:03 +0000 (20:29 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 6 Jan 2017 08:42:39 +0000 (09:42 +0100)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
lib/private/Template/SCSSCacher.php

index e19640e067aa6d45c51dc98e5b59e265a4d7867e..0c1711b9fb72b34b1cd6449f1c95f5260a07b594 100644 (file)
@@ -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);
        }