mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
Merge pull request #6609 from battye/ticket/17175
[ticket/17175] Fix topic title in the breadcrumbs when emailing a topic
This commit is contained in:
commit
8a8232109c
1 changed files with 13 additions and 4 deletions
|
@ -941,10 +941,19 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
else if ($topic_id)
|
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
|
// Generate the navlinks based on the selected topic
|
||||||
FROM ' . FORUMS_TABLE . ' as f,
|
$navlinks_sql_array = [
|
||||||
' . TOPICS_TABLE . ' as t
|
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
|
||||||
WHERE t.forum_id = f.forum_id';
|
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);
|
$result = $db->sql_query($sql);
|
||||||
$topic_data = $db->sql_fetchrow($result);
|
$topic_data = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue