aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-26 23:10:10 -0800
committerfriendica <info@friendica.com>2013-11-26 23:10:10 -0800
commitda29ce6dac0667de2883101e34c9dd64258719ce (patch)
tree76d0b1caff379340900bf2f825a17324b383f843 /include
parentff635f0133532b82efc1e1fb531a1e3943cfe337 (diff)
downloadvolse-hubzilla-da29ce6dac0667de2883101e34c9dd64258719ce.tar.gz
volse-hubzilla-da29ce6dac0667de2883101e34c9dd64258719ce.tar.bz2
volse-hubzilla-da29ce6dac0667de2883101e34c9dd64258719ce.zip
more loop prevention
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php8
1 files changed, 8 insertions, 0 deletions
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 );