From: Hypolite Petovan Date: Tue, 8 Nov 2022 02:44:42 +0000 (-0500) Subject: Delete mod/repair_ostatus.php file X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e612137a9d29baad8260abddfe78a0d451df89a6;p=friendica.git Delete mod/repair_ostatus.php file --- diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php deleted file mode 100644 index b0ee0bf575..0000000000 --- a/mod/repair_ostatus.php +++ /dev/null @@ -1,64 +0,0 @@ -. - * - */ - -use Friendica\App; -use Friendica\Core\Protocol; -use Friendica\Database\DBA; -use Friendica\DI; -use Friendica\Model\Contact; - -function repair_ostatus_content(App $a) { - - if (!DI::userSession()->getLocalUserId()) { - DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); - DI::baseUrl()->redirect('ostatus_repair'); - // NOTREACHED - } - - $o = '

' . DI::l10n()->t('Resubscribing to OStatus contacts') . '

'; - - $uid = DI::userSession()->getLocalUserId(); - - $counter = intval($_REQUEST['counter'] ?? 0); - - $condition = ['uid' => $uid, 'network' => Protocol::OSTATUS, 'rel' => [Contact::FRIEND, Contact::SHARING]]; - $total = DBA::count('contact', $condition); - - if (!$total) { - return ($o . DI::l10n()->tt('Error', 'Errors', 1)); - } - - $contact = Contact::selectToArray(['url'], $condition, ['order' => ['url'], 'limit' => [$counter++, 1]]); - if (!DBA::isResult($contact)) { - $o .= DI::l10n()->t('Done'); - return $o; - } - - $o .= '

' . $counter . '/' . $total . ': ' . $contact[0]['url'] . '

'; - - $o .= '

' . DI::l10n()->t('Keep this window open until done.') . '

'; - - Contact::createFromProbeForUser($a->getLoggedInUserId(), $contact[0]['url']); - - DI::page()['htmlhead'] = ''; - - return $o; -}