delete item page respond with json if called via ajax.
This commit is contained in:
parent
f1a0aeb480
commit
0a79b2300c
|
@ -929,8 +929,13 @@ function item_content(&$a) {
|
||||||
|
|
||||||
$o = '';
|
$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])) {
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
$o = drop_item($a->argv[2]);
|
$o = drop_item($a->argv[2], !is_ajax());
|
||||||
|
if (is_ajax()){
|
||||||
|
// ajax return: [<item id>, 0 (no perm) | <owner id>]
|
||||||
|
echo json_encode(array(intval($a->argv[2]), intval($o)));
|
||||||
|
kllme();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue