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
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
}
}