Split goaway to System::externalRedirectTo() and App->internalRedirect()

This commit is contained in:
Philipp Holzer 2018-10-19 20:11:27 +02:00
parent 2ef81108b3
commit d00ddc01af
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
61 changed files with 286 additions and 266 deletions

View file

@ -354,7 +354,7 @@ function drop_item($id)
if (!DBA::isResult($item)) {
notice(L10n::t('Item not found.') . EOL);
$a->redirect('network');
$a->internalRedirect('network');
}
if ($item['deleted']) {
@ -401,17 +401,17 @@ function drop_item($id)
}
// Now check how the user responded to the confirmation query
if (!empty($_REQUEST['canceled'])) {
$a->redirect('display/' . $item['guid']);
$a->internalRedirect('display/' . $item['guid']);
}
// delete the item
Item::deleteForUser(['id' => $item['id']], local_user());
$a->redirect('network');
$a->internalRedirect('network');
//NOTREACHED
} else {
notice(L10n::t('Permission denied.') . EOL);
$a->redirect('display/' . $item['guid']);
$a->internalRedirect('display/' . $item['guid']);
//NOTREACHED
}
}