mirror of
https://github.com/friendica/friendica
synced 2024-11-19 00:23:47 +00:00
Ensure to mostly fetch the item with an non zero user id
This commit is contained in:
parent
8d513d74be
commit
6c792588fd
2 changed files with 5 additions and 5 deletions
|
@ -902,7 +902,7 @@ function conversation_add_children($parents, $block_authors, $order) {
|
|||
foreach ($parents AS $parent) {
|
||||
$thread_items = dba::p(item_query()."AND `item`.`parent-uri` = ?
|
||||
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());
|
||||
|
||||
$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` = ?)
|
||||
$sql_extra
|
||||
ORDER BY `parent` DESC, `gravity` ASC, `id` ASC",
|
||||
$item_id
|
||||
$r = dba::p(item_query()."AND `item`.`parent-uri` = (SELECT `parent-uri` FROM `item` WHERE `id` = ?)
|
||||
AND `item`.`uid` IN (0, ?) $sql_extra
|
||||
ORDER BY `item`.`uid` ASC, `parent` DESC, `gravity` ASC, `id` ASC",
|
||||
$item_id, local_user()
|
||||
);
|
||||
|
||||
if (!DBM::is_result($r)) {
|
||||
|
|
Loading…
Reference in a new issue