X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fostatus_subscribe.php;h=751afcc7315a085408ec859fb6b5623d7bb1fdae;hb=ca9f8e7420d925fb316f8841f338a4583d94fe51;hp=f6d826e85a5b406cd785008018e326996ec8110a;hpb=58f69481e61a091f919a8c9cc7d6662e876e765f;p=friendica.git diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index f6d826e85a..751afcc731 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -1,25 +1,39 @@ . + * */ use Friendica\App; -use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\DI; 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); + notice(DI::l10n()->t('Permission denied.') . EOL); DI::baseUrl()->redirect('ostatus_subscribe'); // NOTREACHED } - $o = '
' . $counter . '/' . $total . ': ' . $url; - $probed = Probe::uri($url); + $probed = Contact::getByURL($url); if ($probed['network'] == Protocol::OSTATUS) { - $result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS); + $result = Contact::createFromProbe($a->user, $probed['url'], true, Protocol::OSTATUS); if ($result['success']) { - $o .= ' - ' . L10n::t('success'); + $o .= ' - ' . DI::l10n()->t('success'); } else { - $o .= ' - ' . L10n::t('failed'); + $o .= ' - ' . DI::l10n()->t('failed'); } } else { - $o .= ' - ' . L10n::t('ignored'); + $o .= ' - ' . DI::l10n()->t('ignored'); } $o .= '
'; - $o .= '' . L10n::t('Keep this window open until done.') . '
'; + $o .= '' . DI::l10n()->t('Keep this window open until done.') . '
'; DI::page()['htmlhead'] = '';