mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
#6368, thanks to ToonArmy
git-svn-id: file:///svn/phpbb/trunk@6784 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3503830c47
commit
9e5819ac4c
1 changed files with 8 additions and 4 deletions
|
@ -463,14 +463,18 @@ function merge_posts($topic_id, $to_topic_id)
|
||||||
$success_msg = 'POSTS_MERGED_SUCCESS';
|
$success_msg = 'POSTS_MERGED_SUCCESS';
|
||||||
|
|
||||||
// Does the original topic still exist? If yes, link back to it
|
// Does the original topic still exist? If yes, link back to it
|
||||||
$topic_data = get_topic_data(array($topic_id));
|
$sql = 'SELECT forum_id
|
||||||
|
FROM ' . TOPICS_TABLE . '
|
||||||
|
WHERE topic_id = ' . $topic_id;
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
if (sizeof($topic_data))
|
if ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$topic_data = $topic_data[$topic_id];
|
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
||||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_data['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Link to the new topic
|
// Link to the new topic
|
||||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue