The delete function is now changed to the new function

This commit is contained in:
Michael 2018-01-17 23:22:01 +00:00
parent 000e6457b4
commit 2d66242b4f
8 changed files with 42 additions and 212 deletions

View file

@ -972,7 +972,11 @@ function item_content(App $a) {
$o = '';
if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
$o = drop_item($a->argv[2], !is_ajax());
if (is_ajax()) {
$o = Item::delete($a->argv[2]);
} else {
$o = drop_item($a->argv[2]);
}
if (is_ajax()) {
// ajax return: [<item id>, 0 (no perm) | <owner id>]
echo json_encode([intval($a->argv[2]), intval($o)]);