From: Tobias Diekershoff Date: Sun, 31 Mar 2019 06:53:25 +0000 (+0200) Subject: dont check but only copy if BasePath is present X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=16f44a8237ca0ba0ceea47696cf3a6be306e575d;p=friendica.git dont check but only copy if BasePath is present --- diff --git a/src/App.php b/src/App.php index 3408241a1a..e55514fc73 100644 --- a/src/App.php +++ b/src/App.php @@ -182,13 +182,11 @@ class App */ public function registerStylesheet($path) { - if (!empty($this->getBasePath())) { - $url = str_replace($this->getBasePath() . DIRECTORY_SEPARATOR, '', $path); - } else { - $url = $path; + if (mb_strpos($path, $this->getBasePath() . DIRECTORY_SEPARATOR) == 0) { + $path = mb_substr($path, mb_strlen($this->getBasePath() . DIRECTORY_SEPARATOR)); } - $this->stylesheets[] = trim($url, '/'); + $this->stylesheets[] = trim($path, '/'); } /**