1
0
Fork 0

Redirect to previous page after NON-AJAX Post delete via second parameter in /item/drop

This commit is contained in:
Jonny Tischbein 2018-10-25 23:57:26 +02:00
commit b66bcb20da
4 changed files with 15 additions and 6 deletions

View file

@ -881,11 +881,11 @@ function item_content(App $a)
$o = '';
if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
if (($a->argc >= 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
if ($a->isAjax()) {
$o = Item::deleteForUser(['id' => $a->argv[2]], local_user());
} else {
$o = drop_item($a->argv[2]);
$o = drop_item($a->argv[2], $a->argv[3]);
}
if ($a->isAjax()) {