mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:55:18 +00:00
more loop prevention
This commit is contained in:
parent
ff635f0133
commit
da29ce6dac
1 changed files with 8 additions and 0 deletions
|
@ -3551,6 +3551,14 @@ function drop_item($id,$interactive = true) {
|
|||
|
||||
if($ok_to_delete) {
|
||||
|
||||
// set the deleted flag immediately on this item just in case the
|
||||
// hook calls a remote process which loops. We'll delete it properly in a second.
|
||||
|
||||
$r = q("UPDATE item SET item_restrict = ( item_restrict | %d ) WHERE id = %d LIMIT 1",
|
||||
intval(ITEM_DELETED),
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
$arr = array('item' => $item);
|
||||
call_hooks('drop_item', $arr );
|
||||
|
||||
|
|
Loading…
Reference in a new issue