mirror of
https://github.com/friendica/friendica
synced 2024-12-24 01:20:16 +00:00
Remote items should be threaded now
This commit is contained in:
parent
786e9064f2
commit
5d1eb37b9b
1 changed files with 2 additions and 2 deletions
|
@ -925,6 +925,8 @@ function item_store($arr,$force_parent = false) {
|
||||||
$arr['origin'] = ((x($arr,'origin')) ? intval($arr['origin']) : 0 );
|
$arr['origin'] = ((x($arr,'origin')) ? intval($arr['origin']) : 0 );
|
||||||
$arr['guid'] = ((x($arr,'guid')) ? notags(trim($arr['guid'])) : get_guid());
|
$arr['guid'] = ((x($arr,'guid')) ? notags(trim($arr['guid'])) : get_guid());
|
||||||
|
|
||||||
|
|
||||||
|
$arr['thr-parent'] = $arr['parent-uri'];
|
||||||
if($arr['parent-uri'] === $arr['uri']) {
|
if($arr['parent-uri'] === $arr['uri']) {
|
||||||
$parent_id = 0;
|
$parent_id = 0;
|
||||||
$parent_deleted = 0;
|
$parent_deleted = 0;
|
||||||
|
@ -950,7 +952,6 @@ function item_store($arr,$force_parent = false) {
|
||||||
// and re-attach to the conversation parent.
|
// and re-attach to the conversation parent.
|
||||||
|
|
||||||
if($r[0]['uri'] != $r[0]['parent-uri']) {
|
if($r[0]['uri'] != $r[0]['parent-uri']) {
|
||||||
$arr['thr-parent'] = $arr['parent-uri'];
|
|
||||||
$arr['parent-uri'] = $r[0]['parent-uri'];
|
$arr['parent-uri'] = $r[0]['parent-uri'];
|
||||||
$z = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `parent-uri` = '%s' AND `uid` = %d
|
$z = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `parent-uri` = '%s' AND `uid` = %d
|
||||||
ORDER BY `id` ASC LIMIT 1",
|
ORDER BY `id` ASC LIMIT 1",
|
||||||
|
@ -992,7 +993,6 @@ function item_store($arr,$force_parent = false) {
|
||||||
if($force_parent) {
|
if($force_parent) {
|
||||||
logger('item_store: $force_parent=true, reply converted to top-level post.');
|
logger('item_store: $force_parent=true, reply converted to top-level post.');
|
||||||
$parent_id = 0;
|
$parent_id = 0;
|
||||||
$arr['thr-parent'] = $arr['parent-uri'];
|
|
||||||
$arr['parent-uri'] = $arr['uri'];
|
$arr['parent-uri'] = $arr['uri'];
|
||||||
$arr['gravity'] = 0;
|
$arr['gravity'] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue