Split goaway to System::externalRedirectTo() and App->internalRedirect()
This commit is contained in:
+7
-7
@@ -38,7 +38,7 @@ function profiles_init(App $a) {
|
||||
);
|
||||
if (! DBA::isResult($r)) {
|
||||
notice(L10n::t('Profile not found.') . EOL);
|
||||
$a->redirect('profiles');
|
||||
$a->internalRedirect('profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ function profiles_init(App $a) {
|
||||
info(L10n::t('Profile deleted.').EOL);
|
||||
}
|
||||
|
||||
$a->redirect('profiles');
|
||||
$a->internalRedirect('profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ function profiles_init(App $a) {
|
||||
|
||||
info(L10n::t('New profile created.') . EOL);
|
||||
if (DBA::isResult($r3) && count($r3) == 1) {
|
||||
$a->redirect('profiles/' . $r3[0]['id']);
|
||||
$a->internalRedirect('profiles/' . $r3[0]['id']);
|
||||
}
|
||||
|
||||
$a->redirect('profiles');
|
||||
$a->internalRedirect('profiles');
|
||||
}
|
||||
|
||||
if (($a->argc > 2) && ($a->argv[1] === 'clone')) {
|
||||
@@ -132,10 +132,10 @@ function profiles_init(App $a) {
|
||||
);
|
||||
info(L10n::t('New profile created.') . EOL);
|
||||
if ((DBA::isResult($r3)) && (count($r3) == 1)) {
|
||||
$a->redirect('profiles/'.$r3[0]['id']);
|
||||
$a->internalRedirect('profiles/'.$r3[0]['id']);
|
||||
}
|
||||
|
||||
$a->redirect('profiles');
|
||||
$a->internalRedirect('profiles');
|
||||
|
||||
return; // NOTREACHED
|
||||
}
|
||||
@@ -654,7 +654,7 @@ function profiles_content(App $a) {
|
||||
);
|
||||
if (DBA::isResult($r)) {
|
||||
//Go to the default profile.
|
||||
$a->redirect('profiles/' . $r[0]['id']);
|
||||
$a->internalRedirect('profiles/' . $r[0]['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user