From da29ce6dac0667de2883101e34c9dd64258719ce Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Nov 2013 23:10:10 -0800 Subject: more loop prevention --- include/items.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 02f733d92..45c5f5ac9 100755 --- a/include/items.php +++ b/include/items.php @@ -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 ); -- cgit v1.2.3