From: Domovoy Date: Sun, 5 Aug 2012 11:30:51 +0000 (+0200) Subject: Remote items should be threaded now X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5d1eb37b9b04c44ee4c627bdd7fd53e6b1a3dffd;p=friendica.git Remote items should be threaded now --- diff --git a/include/items.php b/include/items.php index 3b09dfa688..13e4897aac 100755 --- a/include/items.php +++ b/include/items.php @@ -925,6 +925,8 @@ function item_store($arr,$force_parent = false) { $arr['origin'] = ((x($arr,'origin')) ? intval($arr['origin']) : 0 ); $arr['guid'] = ((x($arr,'guid')) ? notags(trim($arr['guid'])) : get_guid()); + + $arr['thr-parent'] = $arr['parent-uri']; if($arr['parent-uri'] === $arr['uri']) { $parent_id = 0; $parent_deleted = 0; @@ -950,7 +952,6 @@ function item_store($arr,$force_parent = false) { // and re-attach to the conversation parent. if($r[0]['uri'] != $r[0]['parent-uri']) { - $arr['thr-parent'] = $arr['parent-uri']; $arr['parent-uri'] = $r[0]['parent-uri']; $z = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `parent-uri` = '%s' AND `uid` = %d ORDER BY `id` ASC LIMIT 1", @@ -992,7 +993,6 @@ function item_store($arr,$force_parent = false) { if($force_parent) { logger('item_store: $force_parent=true, reply converted to top-level post.'); $parent_id = 0; - $arr['thr-parent'] = $arr['parent-uri']; $arr['parent-uri'] = $arr['uri']; $arr['gravity'] = 0; }