aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/posting.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 0d0ddd12d5..d22b388e7d 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -319,8 +319,12 @@ if($mode == "newtopic" || $mode == "reply")
if($db->sql_query($sql))
{
$sql = "UPDATE " . TOPICS_TABLE . "
- SET topic_last_post_id = $new_post_id
- WHERE topic_id = $new_topic_id";
+ SET topic_last_post_id = $new_post_id";
+ if($mode == "reply")
+ {
+ $sql .= ", topic_replies = topic_replies + 1 ";
+ }
+ $sql .= " WHERE topic_id = $new_topic_id";
if($db->sql_query($sql))
{