From: Roland Häder Date: Wed, 21 Dec 2016 08:11:58 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/develop' into develop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b580c238445100e95b2b43343a82d0e5f7a14630;p=friendica.git Merge remote-tracking branch 'upstream/develop' into develop Signed-off-by: Roland Häder Conflicts: mod/proxy.php --- b580c238445100e95b2b43343a82d0e5f7a14630 diff --cc mod/proxy.php index af0f912616,736b44007f..bf1e93ccf8 --- a/mod/proxy.php +++ b/mod/proxy.php @@@ -321,12 -321,16 +321,16 @@@ function proxy_url($url, $writemode = f * @return boolean */ function proxy_is_local_image($url) { - if ($url[0] == '/') return true; + if ($url[0] == '/') { + return true; + } - if (strtolower(substr($url, 0, 5)) == "data:") return true; + if (strtolower(substr($url, 0, 5)) == 'data:') { + return true; + } // links normalised - bug #431 - $baseurl = normalise_link(get_app()->get_baseurl()); + $baseurl = normalise_link(App::get_baseurl()); $url = normalise_link($url); return (substr($url, 0, strlen($baseurl)) == $baseurl); } @@@ -365,8 -372,8 +372,7 @@@ function proxy_img_cb($matches) } function proxy_parse_html($html) { -- $a = get_app(); - $html = str_replace(normalise_link(App::get_baseurl())."/", App::get_baseurl()."/", $html); - $html = str_replace(normalise_link($a->get_baseurl()) . '/', $a->get_baseurl() . '/', $html); ++ $html = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $html); - return preg_replace_callback("/(]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "proxy_img_cb", $html); + return preg_replace_callback('/(]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'proxy_img_cb', $html); }