Remote items should be threaded now

This commit is contained in:
Domovoy 2012-08-05 13:30:51 +02:00
parent 786e9064f2
commit 5d1eb37b9b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}