mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
"It's a trap!"
git-svn-id: file:///svn/phpbb/trunk@7467 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
dfe674ffa1
commit
6fbe97224e
1 changed files with 4 additions and 6 deletions
|
@ -352,10 +352,9 @@ function change_topic_type($action, $topic_ids)
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Do a little forum sync stuff
|
// 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
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids) . '
|
WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
|
||||||
GROUP BY t.topic_posts';
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row_data = $db->sql_fetchrow($result);
|
$row_data = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
@ -420,10 +419,9 @@ function change_topic_type($action, $topic_ids)
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Do a little forum sync stuff
|
// 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
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids) . '
|
WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
|
||||||
GROUP BY t.topic_posts';
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row_data = $db->sql_fetchrow($result);
|
$row_data = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue