mirror of
https://github.com/friendica/friendica
synced 2025-04-20 15:50:12 +00:00
Renamed System::redirect() to $a->redirect()
This commit is contained in:
parent
c46caeb0d3
commit
2ef81108b3
62 changed files with 269 additions and 253 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue