]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Proxy.php
Merge pull request #6225 from annando/http-error
[friendica.git] / src / Util / Proxy.php
index 8478ce868af103794aad2ba1c534fc929dff3a57..be70077f15d98b7eb4d14d40a7c71db193a2f4d3 100644 (file)
@@ -6,6 +6,7 @@ use Friendica\BaseModule;
 use Friendica\BaseObject;
 use Friendica\Core\Config;
 use Friendica\Core\System;
+use Friendica\Util\Strings;
 
 /**
  * @brief Proxy utilities class
@@ -76,7 +77,7 @@ class Proxy
 
                // Only continue if it isn't a local image and the isn't deactivated
                if (self::isLocalImage($url)) {
-                       $url = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $url);
+                       $url = str_replace(Strings::normaliseLink(System::baseUrl()) . '/', System::baseUrl() . '/', $url);
                        return $url;
                }
 
@@ -140,7 +141,7 @@ class Proxy
         */
        public static function proxifyHtml($html)
        {
-               $html = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $html);
+               $html = str_replace(Strings::normaliseLink(System::baseUrl()) . '/', System::baseUrl() . '/', $html);
 
                return preg_replace_callback('/(<img [^>]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'self::replaceUrl', $html);
        }
@@ -162,8 +163,8 @@ class Proxy
                }
 
                // links normalised - bug #431
-               $baseurl = normalise_link(System::baseUrl());
-               $url = normalise_link($url);
+               $baseurl = Strings::normaliseLink(System::baseUrl());
+               $url = Strings::normaliseLink($url);
 
                return (substr($url, 0, strlen($baseurl)) == $baseurl);
        }