aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-25 15:27:33 -0800
committerfriendica <info@friendica.com>2015-02-25 15:27:33 -0800
commitb32841e2ddc53758957ca3afccb3e045fdf2e9fe (patch)
treef9d7a47b8f7f7b3b3382f6e99950e9ab19c0183d /include/items.php
parent1a071ea4f07d4e3a1dd4199f6523d61f8bbc69b8 (diff)
downloadvolse-hubzilla-b32841e2ddc53758957ca3afccb3e045fdf2e9fe.tar.gz
volse-hubzilla-b32841e2ddc53758957ca3afccb3e045fdf2e9fe.tar.bz2
volse-hubzilla-b32841e2ddc53758957ca3afccb3e045fdf2e9fe.zip
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.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php11
1 files changed, 10 insertions, 1 deletions
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.