From 2170cd3a9dc06ab98fa47c71a227170be37c8752 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Fri, 6 Jul 2001 18:56:19 +0000 Subject: [PATCH] Code wasn't updating the topic_replies git-svn-id: file:///svn/phpbb/trunk@586 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 8 ++++++-- 1 file 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)) {