aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-07-09 22:35:17 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-07-09 22:35:17 +0000
commitfe189c90de14068d29e994ffee5caf2e13e74fa3 (patch)
treee5cf79fd45876f5b0dbb4e9687c475ba9654734b /phpBB/posting.php
parenta03286497495918fb735170fc3cba72ec8a236ef (diff)
downloadforums-fe189c90de14068d29e994ffee5caf2e13e74fa3.tar
forums-fe189c90de14068d29e994ffee5caf2e13e74fa3.tar.gz
forums-fe189c90de14068d29e994ffee5caf2e13e74fa3.tar.bz2
forums-fe189c90de14068d29e994ffee5caf2e13e74fa3.tar.xz
forums-fe189c90de14068d29e994ffee5caf2e13e74fa3.zip
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
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php8
1 files changed, 6 insertions, 2 deletions
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))
{