aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-12-20 22:36:06 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-12-20 22:36:06 +0000
commit9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1 (patch)
treecc8b56c3ac5d80359446296dc8cf8211f878856a /phpBB/includes
parent3503830c47600fdb7ce5df806030cdc7d1dd3f53 (diff)
downloadforums-9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1.tar
forums-9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1.tar.gz
forums-9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1.tar.bz2
forums-9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1.tar.xz
forums-9e5819ac4c2afacd5a66e7e9e2dc71f0f182c0b1.zip
#6368, thanks to ToonArmy
git-svn-id: file:///svn/phpbb/trunk@6784 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_topic.php12
1 files changed, 8 insertions, 4 deletions
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'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_data['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
+ $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
}
+ $db->sql_freeresult($result);
+
// 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 . '&amp;t=' . $to_topic_id) . '">', '</a>');
}