diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 2b761bfcae..bc0d18afbd 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -463,14 +463,18 @@ function merge_posts($topic_id, $to_topic_id) $success_msg = 'POSTS_MERGED_SUCCESS'; // 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'], '', ''); + $return_link .= sprintf($user->lang['RETURN_TOPIC'], '', ''); } + $db->sql_freeresult($result); + // Link to the new topic $return_link .= (($return_link) ? '

' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); }