1
0
Fork 0

New function to delete items for users

This commit is contained in:
Michael 2018-05-29 05:22:57 +00:00
commit 8329705eba
11 changed files with 53 additions and 55 deletions

View file

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