From: Roland Häder Date: Sat, 28 Jul 2018 18:24:16 +0000 (+0200) Subject: [global] CR request: Moved proxify*() methods to separate class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e269589c65b990e5822c559fa2e6ca66f79eb327;p=friendica-addons.git [global] CR request: Moved proxify*() methods to separate class --- diff --git a/buffer/buffer.php b/buffer/buffer.php index c0a06d06..69b313ed 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -15,7 +15,7 @@ use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Database\DBA; use Friendica\Model\ItemContent; -use Friendica\Module\Proxy; +use Friendica\Util\ProxyUtils; function buffer_install() { @@ -365,11 +365,11 @@ function buffer_send(App $a, array &$b) // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures if (isset($post["image"])) { - $post["image"] = Proxy::proxifyUrl($post["image"]); + $post["image"] = ProxyUtils::proxifyUrl($post["image"]); } if (isset($post["preview"])) { - $post["preview"] = Proxy::proxifyUrl($post["preview"]); + $post["preview"] = ProxyUtils::proxifyUrl($post["preview"]); } // Seems like a bug to me diff --git a/curweather/curweather.php b/curweather/curweather.php index 6c8efa76..c3abba16 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -17,8 +17,8 @@ use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; -use Friendica\Module\Proxy; use Friendica\Util\Network; +use Friendica\Util\ProxyUtils; 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::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'), + '$icon' => ProxyUtils::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 64dcf1e0..8177c080 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -11,7 +11,7 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; -use Friendica\Module\Proxy; +use Friendica\Util\ProxyUtils; function impressum_install() { Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config'); @@ -40,7 +40,7 @@ function obfuscate_email ($s) { return $s; } function impressum_footer($a, &$b) { - $text = Proxy::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); + $text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); if (! $text == '') { $a->page['htmlhead'] .= ''; @@ -58,8 +58,8 @@ function impressum_show($a,&$b) { $b .= '

'.L10n::t('Impressum').'

'; $owner = Config::get('impressum', 'owner'); $owner_profile = Config::get('impressum','ownerprofile'); - $postal = Proxy::proxifyHtml(BBCode::convert(Config::get('impressum', 'postal'))); - $notes = Proxy::proxifyHtml(BBCode::convert(Config::get('impressum', 'notes'))); + $postal = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum', 'postal'))); + $notes = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum', 'notes'))); $email = obfuscate_email( Config::get('impressum','email') ); if (strlen($owner)) { if (strlen($owner_profile)) { diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index 079477e4..b9214d8e 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -14,8 +14,8 @@ use Friendica\Core\Addon; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\Protocol; -use Friendica\Module\Proxy; use Friendica\Util\Network; +use Friendica\Util\ProxyUtils; function mastodoncustomemojis_install() { @@ -89,7 +89,7 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link) if (is_array($emojis_array)) { foreach ($emojis_array as $emoji) { $emojis['texts'][] = ':' . $emoji['shortcode'] . ':'; - $emojis['icons'][] = ':' . $emoji['shortcode'] . ':'; + $emojis['icons'][] = ':' . $emoji['shortcode'] . ':'; } }