diff --git a/buffer/buffer.php b/buffer/buffer.php index 0f43a0ece..4a8185e04 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -15,6 +15,7 @@ use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Database\DBA; use Friendica\Model\ItemContent; +use Friendica\Network\Proxy; function buffer_install() { @@ -363,14 +364,12 @@ function buffer_send(App $a, array &$b) logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG); // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures - require_once "mod/proxy.php"; - if (isset($post["image"])) { - $post["image"] = proxy_url($post["image"]); + $post["image"] = Proxy::proxifyUrl($post["image"]); } if (isset($post["preview"])) { - $post["preview"] = proxy_url($post["preview"]); + $post["preview"] = Proxy::proxifyUrl($post["preview"]); } // Seems like a bug to me diff --git a/curweather/curweather.php b/curweather/curweather.php index 6852ee70f..cfc4fc183 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -9,7 +9,6 @@ * */ -require_once 'mod/proxy.php'; require_once 'include/text.php'; use Friendica\App; @@ -18,6 +17,7 @@ use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Network\Proxy; use Friendica\Util\Network; function curweather_install() @@ -138,7 +138,7 @@ function curweather_network_mod_init(App $a, &$b) $t = get_markup_template("widget.tpl", "addon/curweather/" ); $curweather = replace_macros ($t, [ '$title' => L10n::t("Current Weather"), - '$icon' => proxy_url('http://openweathermap.org/img/w/'.$res['icon'].'.png'), + '$icon' => Proxy::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'), '$city' => $res['city'], '$lon' => $res['lon'], '$lat' => $res['lat'], diff --git a/impressum/impressum.php b/impressum/impressum.php index 149b13954..f44f07af9 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -7,12 +7,11 @@ * License: 3-clause BSD license */ -require_once 'mod/proxy.php'; - use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Network\Proxy; function impressum_install() { Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config'); @@ -41,7 +40,8 @@ function obfuscate_email ($s) { return $s; } function impressum_footer($a, &$b) { - $text = proxy_parse_html(BBCode::convert(Config::get('impressum','footer_text'))); + $text = Proxy::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); + if (! $text == '') { $a->page['htmlhead'] .= ''; $b .= '
'; @@ -58,8 +58,8 @@ function impressum_show($a,&$b) { $b .= '