1
0
Fork 0

delete item page respond with json if called via ajax.

This commit is contained in:
Fabrixxm 2013-02-15 06:34:32 -05:00
parent f1a0aeb480
commit 0a79b2300c

View file

@ -930,7 +930,12 @@ function item_content(&$a) {
$o = '';
if(($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
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;
}