Ensure to mostly fetch the item with an non zero user id
This commit is contained in:
parent
8d513d74be
commit
6c792588fd
|
@ -902,7 +902,7 @@ function conversation_add_children($parents, $block_authors, $order) {
|
||||||
foreach ($parents AS $parent) {
|
foreach ($parents AS $parent) {
|
||||||
$thread_items = dba::p(item_query()."AND `item`.`parent-uri` = ?
|
$thread_items = dba::p(item_query()."AND `item`.`parent-uri` = ?
|
||||||
AND `item`.`uid` IN (0, ?) $block_sql
|
AND `item`.`uid` IN (0, ?) $block_sql
|
||||||
ORDER BY `item`.`commented` DESC" . $limit,
|
ORDER BY `item`.`uid` ASC, `item`.`commented` DESC" . $limit,
|
||||||
$parent['uri'], local_user());
|
$parent['uri'], local_user());
|
||||||
|
|
||||||
$comments = dba::inArray($thread_items);
|
$comments = dba::inArray($thread_items);
|
||||||
|
|
|
@ -344,10 +344,10 @@ function display_content(App $a, $update = false, $update_uid = 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = dba::p(item_query()."AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?)
|
$r = dba::p(item_query()."AND `item`.`parent-uri` = (SELECT `parent-uri` FROM `item` WHERE `id` = ?)
|
||||||
$sql_extra
|
AND `item`.`uid` IN (0, ?) $sql_extra
|
||||||
ORDER BY `parent` DESC, `gravity` ASC, `id` ASC",
|
ORDER BY `item`.`uid` ASC, `parent` DESC, `gravity` ASC, `id` ASC",
|
||||||
$item_id
|
$item_id, local_user()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!DBM::is_result($r)) {
|
if (!DBM::is_result($r)) {
|
||||||
|
|
Loading…
Reference in a new issue