From 6fbe97224e1ddb7b461fec43ab6bff02fdf94e9c Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 5 May 2007 05:04:05 +0000 Subject: [PATCH] "It's a trap!" git-svn-id: file:///svn/phpbb/trunk@7467 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_main.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index fd2f4345ed..dd07fedf24 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -352,10 +352,9 @@ function change_topic_type($action, $topic_ids) $db->sql_query($sql); // Do a little forum sync stuff - $sql = 'SELECT t.topic_replies + 1 as topic_posts, COUNT(t.topic_approved) as topics_authed + $sql = 'SELECT SUM(t.topic_replies + 1) as topic_posts, COUNT(t.topic_approved) as topics_authed FROM ' . TOPICS_TABLE . ' t - WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids) . ' - GROUP BY t.topic_posts'; + WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids); $result = $db->sql_query($sql); $row_data = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -420,10 +419,9 @@ function change_topic_type($action, $topic_ids) $db->sql_query($sql); // Do a little forum sync stuff - $sql = 'SELECT t.topic_replies + 1 as topic_posts, COUNT(t.topic_approved) as topics_authed + $sql = 'SELECT SUM(t.topic_replies + 1) as topic_posts, COUNT(t.topic_approved) as topics_authed FROM ' . TOPICS_TABLE . ' t - WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids) . ' - GROUP BY t.topic_posts'; + WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids); $result = $db->sql_query($sql); $row_data = $db->sql_fetchrow($result); $db->sql_freeresult($result);