]> git.mxchange.org Git - friendica.git/commitdiff
dont check but only copy if BasePath is present
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 31 Mar 2019 06:53:25 +0000 (08:53 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 31 Mar 2019 06:53:25 +0000 (08:53 +0200)
src/App.php

index 3408241a1ad65c161d0211d1fce2729b4c9b5316..e55514fc736bacf4b13d327e0e08f441e06b854f 100644 (file)
@@ -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, '/');
        }
 
        /**