X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Frepair_ostatus.php;h=b0ee0bf575ba3bb9ebd2f5b712f607d344fca7e4;hb=3456ae7809de9381f375e025fbd81dcfdf67dc6e;hp=edbd2e940acbc57d779158975db98608a12b69cb;hpb=08c24fd4fa60c6ca891978ab926cbba5ec418466;p=friendica.git diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index edbd2e940a..b0ee0bf575 100644 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -1,6 +1,6 @@ t('Permission denied.')); + 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") . "

"; + $o = '

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

'; - $uid = local_user(); + $uid = DI::userSession()->getLocalUserId(); $counter = intval($_REQUEST['counter'] ?? 0); @@ -43,20 +43,20 @@ function repair_ostatus_content(App $a) { $total = DBA::count('contact', $condition); if (!$total) { - return ($o . DI::l10n()->t("Error")); + 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"); + $o .= DI::l10n()->t('Done'); return $o; } - $o .= "

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

"; + $o .= '

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

'; - $o .= "

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

"; + $o .= '

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

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