From f13b3b6651b81d1bd4a314ce1e66e164e9ac5f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 27 Dec 2017 11:00:46 +0100 Subject: [PATCH] Fixed scss url rewriting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- lib/private/Template/SCSSCacher.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index c4ec5f95dc..cfe0e60523 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -2,6 +2,13 @@ /** * @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com) * + * @author John Molakvoæ (skjnldsv) + * @author Julius Haertl + * @author Julius Härtl + * @author Lukas Reschke + * @author Morris Jobke + * @author Roeland Jago Douma + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -276,12 +283,7 @@ class SCSSCacher { */ private function rebaseUrls($css, $webDir) { $re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; - // OC\Route\Router:75 - if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { - $subst = 'url(\'../../'.$webDir.'/$1\')'; - } else { - $subst = 'url(\'../../../'.$webDir.'/$1\')'; - } + $subst = 'url(\''.$webDir.'/$1\')'; return preg_replace($re, $subst, $css); } @@ -292,6 +294,7 @@ class SCSSCacher { * @return string */ public function getCachedSCSS($appName, $fileName) { + //var_dump([$appName, $fileName]); $tmpfileLoc = explode('/', $fileName); $fileName = array_pop($tmpfileLoc); $fileName = $this->prependBaseurlPrefix(str_replace('.scss', '.css', $fileName));