From fe189c90de14068d29e994ffee5caf2e13e74fa3 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Mon, 9 Jul 2001 22:35:17 +0000 Subject: Fixed bug in posting (forum_topics was incremented on replies, not just new topics) One click lock/unlock/delete works for modcp. git-svn-id: file:///svn/phpbb/trunk@609 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index d22b388e7d..33daaf61cc 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -329,8 +329,12 @@ if($mode == "newtopic" || $mode == "reply") if($db->sql_query($sql)) { $sql = "UPDATE " . FORUMS_TABLE . " - SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1, forum_topics = forum_topics + 1 - WHERE forum_id = $forum_id"; + SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1"; + if($mode == "newtopic") + { + $sql .= ", forum_topics = forum_topics + 1"; + } + $sql .= " WHERE forum_id = $forum_id"; if($db->sql_query($sql)) { -- cgit v1.2.1