From b32841e2ddc53758957ca3afccb3e045fdf2e9fe Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 25 Feb 2015 15:27:33 -0800 Subject: Found the cause of the delete looping, and I can prevent it going forward. The issue remains what to do about comments which are already in the DB and have ITEM_ORIGIN incorrectly set. We can't exactly reset them because the "original" context has been lost. (Sorry but couldn't resist an insider pun that none of you will be able to follow anyway). Read the comments. --- include/items.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index b1e17b171..b7bdad838 100755 --- a/include/items.php +++ b/include/items.php @@ -3073,7 +3073,16 @@ function start_delivery_chain($channel,$item,$item_id,$parent) { if((! $private) && $new_public_policy) $private = 1; - $flag_bits = $item['item_flags'] | ITEM_WALL|ITEM_ORIGIN; + $flag_bits = $item['item_flags'] | ITEM_WALL; + + // The message didn't necessarily originate on this site, (we'll honour it if it did), + // but the parent post of this thread will be reset as a local post, as it is the top of + // this delivery chain and is coming from this site, regardless of where the original + // originated. + + if(! $parent) + $flag_bits = $flag_bits | ITEM_ORIGIN; + // unset the nocomment bit if it's there. -- cgit v1.2.3