X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fostatus_subscribe.php;h=7fce9d0b690c9d9dab224fcb18d4db5ae38419d5;hb=5e577ed1330425ec8da7966e27d24a9ea692e2b8;hp=bef50c2db378c3788e856fd3ac3c87dc182b55ee;hpb=ead9d8623683f8ecdbe9b75bb7fd031d89d54ebe;p=friendica.git diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index bef50c2db3..7fce9d0b69 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -5,19 +5,21 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Core\Protocol; use Friendica\Core\System; use Friendica\Model\Contact; use Friendica\Network\Probe; +use Friendica\Util\Network; function ostatus_subscribe_content(App $a) { if (! local_user()) { notice(L10n::t('Permission denied.') . EOL); - goaway($_SESSION['return_url']); + $a->internalRedirect('ostatus_subscribe'); // NOTREACHED } - $o = "
".$counter."/".$total.": ".$url; - $data = Probe::uri($url); - if ($data["network"] == NETWORK_OSTATUS) { - $result = Contact::createFromProbe($uid, $url, true, NETWORK_OSTATUS); + $curlResult = Probe::uri($url); + if ($curlResult["network"] == Protocol::OSTATUS) { + $result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS); if ($result["success"]) { - $o .= " - ".t("success"); + $o .= " - ".L10n::t("success"); } else { - $o .= " - ".t("failed"); + $o .= " - ".L10n::t("failed"); } } else { - $o .= " - ".t("ignored"); + $o .= " - ".L10n::t("ignored"); } $o .= "
"; - $o .= "".t("Keep this window open until done.")."
"; + $o .= "".L10n::t("Keep this window open until done.")."
"; $a->page['htmlhead'] = '';