]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact.php
Renamed System::redirect() to $a->redirect()
[friendica.git] / src / Module / Contact.php
index 0eb912e00a7b962d5c5f13bfcedc623d643f4f19..1aa2aa0fe8d6f91fb01572d6b7010d6587fd6984 100644 (file)
@@ -66,9 +66,9 @@ class Contact extends BaseModule
                if (DBA::isResult($contact)) {
                        if ($contact['self']) {
                                if (($a->argc == 3) && intval($a->argv[1]) && in_array($a->argv[2], ['posts', 'conversations'])) {
-                                       goaway('profile/' . $contact['nick']);
+                                       $a->redirect('profile/' . $contact['nick']);
                                } else {
-                                       goaway('profile/' . $contact['nick'] . '?tab=profile');
+                                       $a->redirect('profile/' . $contact['nick'] . '?tab=profile');
                                }
                        }
 
@@ -168,7 +168,7 @@ class Contact extends BaseModule
                        info(L10n::tt('%d contact edited.', '%d contacts edited.', $count_actions));
                }
 
-               goaway('contact');
+               $a->redirect('contact');
        }
 
        public static function post()
@@ -191,7 +191,7 @@ class Contact extends BaseModule
 
                if (!DBA::exists('contact', ['id' => $contact_id, 'uid' => local_user()])) {
                        notice(L10n::t('Could not access contact record.') . EOL);
-                       goaway('contact');
+                       $a->redirect('contact');
                        return; // NOTREACHED
                }
 
@@ -374,19 +374,19 @@ class Contact extends BaseModule
                        $orig_record = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => [0, local_user()], 'self' => false]);
                        if (!DBA::isResult($orig_record)) {
                                notice(L10n::t('Could not access contact record.') . EOL);
-                               goaway('contact');
+                               $a->redirect('contact');
                                return; // NOTREACHED
                        }
 
                        if ($cmd === 'update' && ($orig_record['uid'] != 0)) {
                                self::updateContactFromPoll($contact_id);
-                               goaway('contact/' . $contact_id);
+                               $a->redirect('contact/' . $contact_id);
                                // NOTREACHED
                        }
 
                        if ($cmd === 'updateprofile' && ($orig_record['uid'] != 0)) {
                                self::updateContactFromProbe($contact_id);
-                               goaway('crepair/' . $contact_id);
+                               $a->redirect('crepair/' . $contact_id);
                                // NOTREACHED
                        }
 
@@ -396,7 +396,7 @@ class Contact extends BaseModule
                                $blocked = Model\Contact::isBlockedByUser($contact_id, local_user());
                                info(($blocked ? L10n::t('Contact has been blocked') : L10n::t('Contact has been unblocked')) . EOL);
 
-                               goaway('contact/' . $contact_id);
+                               $a->redirect('contact/' . $contact_id);
                                return; // NOTREACHED
                        }
 
@@ -406,7 +406,7 @@ class Contact extends BaseModule
                                $ignored = Model\Contact::isIgnoredByUser($contact_id, local_user());
                                info(($ignored ? L10n::t('Contact has been ignored') : L10n::t('Contact has been unignored')) . EOL);
 
-                               goaway('contact/' . $contact_id);
+                               $a->redirect('contact/' . $contact_id);
                                return; // NOTREACHED
                        }
 
@@ -417,7 +417,7 @@ class Contact extends BaseModule
                                        info((($archived) ? L10n::t('Contact has been archived') : L10n::t('Contact has been unarchived')) . EOL);
                                }
 
-                               goaway('contact/' . $contact_id);
+                               $a->redirect('contact/' . $contact_id);
                                return; // NOTREACHED
                        }
 
@@ -451,13 +451,13 @@ class Contact extends BaseModule
                                }
                                // Now check how the user responded to the confirmation query
                                if (!empty($_REQUEST['canceled'])) {
-                                       goaway('contact');
+                                       $a->redirect('contact');
                                }
 
                                self::dropContact($orig_record);
                                info(L10n::t('Contact has been removed.') . EOL);
 
-                               goaway('contact');
+                               $a->redirect('contact');
                                return; // NOTREACHED
                        }
                        if ($cmd === 'posts') {