New function to delete items for users
This commit is contained in:
parent
deb015be12
commit
8329705eba
11 changed files with 53 additions and 55 deletions
|
@ -321,7 +321,7 @@ function drop_items($items) {
|
|||
|
||||
if (count($items)) {
|
||||
foreach ($items as $item) {
|
||||
$owner = Item::deleteById($item, PRIORITY_HIGH, local_user());
|
||||
$owner = Item::deleteForUser(['id' => $item], local_user());
|
||||
if ($owner && !$uid)
|
||||
$uid = $owner;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ function drop_item($id) {
|
|||
}
|
||||
|
||||
// delete the item
|
||||
Item::deleteById($item['id'], PRIORITY_HIGH, local_user());
|
||||
Item::deleteForUser(['id' => $item['id']], local_user());
|
||||
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
|
||||
//NOTREACHED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue