From e612137a9d29baad8260abddfe78a0d451df89a6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 7 Nov 2022 21:44:42 -0500 Subject: [PATCH] Delete mod/repair_ostatus.php file --- mod/repair_ostatus.php | 64 ------------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 mod/repair_ostatus.php 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; -} -- 2.39.5