Skip to content

Commit

Permalink
Merge branch '3.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
marc1706 committed May 31, 2024
2 parents 6f3d50b + 8a82321 commit 32e6c63
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions phpBB/memberlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,19 @@
}
else if ($topic_id)
{
$sql = 'SELECT f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name, f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options, f.forum_options, t.topic_title
FROM ' . FORUMS_TABLE . ' as f,
' . TOPICS_TABLE . ' as t
WHERE t.forum_id = f.forum_id';
// Generate the navlinks based on the selected topic
$navlinks_sql_array = [
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
f.forum_options, t.topic_title',
'FROM' => [
FORUMS_TABLE => 'f',
TOPICS_TABLE => 't',
],
'WHERE' => 't.forum_id = f.forum_id AND t.topic_id = ' . (int) $topic_id,
];

$sql = $db->sql_build_query('SELECT', $navlinks_sql_array);
$result = $db->sql_query($sql);
$topic_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
Expand Down

0 comments on commit 32e6c63

Please sign in to comment.