The delete function is now changed to the new function
This commit is contained in:
+5
-1
@@ -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)]);
|
||||
|
||||
Reference in New Issue
Block a user