]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: "remove_baseurl" wasn't work correct if called statically
authorrabuzarus <trebor@central-unit>
Wed, 16 Nov 2016 00:14:14 +0000 (01:14 +0100)
committerrabuzarus <trebor@central-unit>
Wed, 16 Nov 2016 00:14:14 +0000 (01:14 +0100)
boot.php

index 230cbc1e3a43a7f24fe1a10f6cff3ed2dddc3518..7e76df87e36c0b2fed34f19e39ea5b31a257fdee 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1041,7 +1041,7 @@ class App {
        /**
         * @brief Removes the baseurl from an url. This avoids some mixed content problems.
         *
-        * @param string $url
+        * @param string $orig_url
         *
         * @return string The cleaned url
         */
@@ -1049,13 +1049,13 @@ class App {
 
                // Is the function called statically?
                if (!is_object($this)) {
-                       return(self::$a->remove_baseurl($url));
+                       return(self::$a->remove_baseurl($orig_url));
                }
 
                // Remove the hostname from the url if it is an internal link
-               $url = normalise_link($orig_url);
+               $nurl = normalise_link($orig_url);
                $base = normalise_link($this->get_baseurl());
-               $url = str_replace($base."/", "", $url);
+               $url = str_replace($base."/", "", $nurl);
 
                // if it is an external link return the orignal value
                if ($url == normalise_link($orig_url)) {