]> git.mxchange.org Git - friendica.git/blobdiff - mod/repair_ostatus.php
Unused use removed
[friendica.git] / mod / repair_ostatus.php
index bc2c8bba2d9ce36e147ebe30e67ed7611a863531..b0ee0bf575ba3bb9ebd2f5b712f607d344fca7e4 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Model\Contact;
 
 function repair_ostatus_content(App $a) {
 
-       if (!local_user()) {
+       if (!DI::userSession()->getLocalUserId()) {
                DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
                DI::baseUrl()->redirect('ostatus_repair');
                // NOTREACHED
@@ -35,7 +35,7 @@ function repair_ostatus_content(App $a) {
 
        $o = '<h2>' . DI::l10n()->t('Resubscribing to OStatus contacts') . '</h2>';
 
-       $uid = local_user();
+       $uid = DI::userSession()->getLocalUserId();
 
        $counter = intval($_REQUEST['counter'] ?? 0);
 
@@ -43,7 +43,7 @@ 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]]);