Merge pull request #10576 from annando/conversation-uid

Fix multiple display problems in conversations
This commit is contained in:
Hypolite Petovan 2021-08-05 12:09:35 -04:00 committed by GitHub
commit 63906bc120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -757,6 +757,10 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
$items = [];
while ($row = Post::fetch($thread_items)) {
if (!empty($items[$row['uri-id']]) && ($row['uid'] == 0)) {
continue;
}
if ($max_comments > 0) {
if (($row['gravity'] == GRAVITY_COMMENT) && (++$commentcounter[$row['parent-uri-id']] > $max_comments)) {
continue;
@ -765,7 +769,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
continue;
}
}
$items[] = conversation_add_row_information($row, $activities[$row['uri-id']] ?? []);
$items[$row['uri-id']] = conversation_add_row_information($row, $activities[$row['uri-id']] ?? []);
}
DBA::close($thread_items);