mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
Split goaway to System::externalRedirectTo() and App->internalRedirect()
This commit is contained in:
parent
2ef81108b3
commit
d00ddc01af
61 changed files with 286 additions and 266 deletions
|
@ -20,7 +20,7 @@ function follow_post(App $a)
|
|||
}
|
||||
|
||||
if (isset($_REQUEST['cancel'])) {
|
||||
$a->redirect('contacts');
|
||||
$a->internalRedirect('contacts');
|
||||
}
|
||||
|
||||
$uid = local_user();
|
||||
|
@ -37,14 +37,14 @@ function follow_post(App $a)
|
|||
if ($result['message']) {
|
||||
notice($result['message']);
|
||||
}
|
||||
$a->redirect($return_url);
|
||||
$a->internalRedirect($return_url);
|
||||
} elseif ($result['cid']) {
|
||||
$a->redirect('contact/' . $result['cid']);
|
||||
$a->internalRedirect('contact/' . $result['cid']);
|
||||
}
|
||||
|
||||
info(L10n::t('The contact could not be added.'));
|
||||
|
||||
$a->redirect($return_url);
|
||||
$a->internalRedirect($return_url);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ function follow_content(App $a)
|
|||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
$a->redirect($return_url);
|
||||
$a->internalRedirect($return_url);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ function follow_content(App $a)
|
|||
if ($r[0]['pending']) {
|
||||
notice(L10n::t('You already added this contact.'));
|
||||
$submit = '';
|
||||
//$a->redirect($_SESSION['return_url']);
|
||||
//$a->internalRedirect($_SESSION['return_url']);
|
||||
// NOTREACHED
|
||||
}
|
||||
}
|
||||
|
@ -84,21 +84,21 @@ function follow_content(App $a)
|
|||
if (($ret['network'] == Protocol::DIASPORA) && !Config::get('system', 'diaspora_enabled')) {
|
||||
notice(L10n::t("Diaspora support isn't enabled. Contact can't be added."));
|
||||
$submit = '';
|
||||
//$a->redirect($_SESSION['return_url']);
|
||||
//$a->internalRedirect($_SESSION['return_url']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
if (($ret['network'] == Protocol::OSTATUS) && Config::get('system', 'ostatus_disabled')) {
|
||||
notice(L10n::t("OStatus support is disabled. Contact can't be added."));
|
||||
$submit = '';
|
||||
//$a->redirect($_SESSION['return_url']);
|
||||
//$a->internalRedirect($_SESSION['return_url']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
if ($ret['network'] == Protocol::PHANTOM) {
|
||||
notice(L10n::t("The network type couldn't be detected. Contact can't be added."));
|
||||
$submit = '';
|
||||
//$a->redirect($_SESSION['return_url']);
|
||||
//$a->internalRedirect($_SESSION['return_url']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ function follow_content(App $a)
|
|||
|
||||
if (!$r) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
$a->redirect($return_url);
|
||||
$a->internalRedirect($return_url);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue