diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-03-30 21:01:01 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-03-30 21:01:01 +0000 |
commit | 36011792e671786f579973ffc67bf4df034179d4 (patch) | |
tree | 13db7853aa792ecf009deb652db015f389bb1c2b /phpBB/includes/functions_posting.php | |
parent | d29495c6c38c1d102ac340461f263fe2d24f29bd (diff) | |
download | forums-36011792e671786f579973ffc67bf4df034179d4.tar forums-36011792e671786f579973ffc67bf4df034179d4.tar.gz forums-36011792e671786f579973ffc67bf4df034179d4.tar.bz2 forums-36011792e671786f579973ffc67bf4df034179d4.tar.xz forums-36011792e671786f579973ffc67bf4df034179d4.zip |
"Real" post and topic counts now updated correctly. Mass-resync your topics/forums.
git-svn-id: file:///svn/phpbb/trunk@3762 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 168bd440f7..0955bf677d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -819,7 +819,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ $forum_ids .= ', ' . $parent_forum_id; } - $forum_topics_sql = ($mode == 'post') ? ', forum_topics = forum_topics + 1' : ''; + $forum_topics_sql = ($mode == 'post') ? ', forum_topics = forum_topics + 1, forum_topics_real = forum_topics_real + 1' : ''; $forum_sql = array( 'forum_last_post_id' => $post_data['post_id'], 'forum_last_post_time' => $current_time, @@ -845,7 +845,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ )); } - $topic_replies_sql = ($mode == 'reply') ? ', topic_replies = topic_replies + 1' : ''; + $topic_replies_sql = ($mode == 'reply') ? ', topic_replies = topic_replies + 1, topic_replies_real = topic_replies_real + 1' : ''; $sql = 'UPDATE ' . TOPICS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $topic_sql) . $topic_replies_sql . ' WHERE topic_id = ' . $post_data['topic_id']; $db->sql_query($sql); @@ -952,7 +952,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $post_data) $forum_update_sql = ''; $user_update_sql = ''; - $topic_update_sql = 'topic_replies = topic_replies - 1'; + $topic_update_sql = 'topic_replies = topic_replies - 1, topic_replies_real = topic_replies_real - 1, '; // Only one post... delete topic if ($post_data['topic_first_post_id'] == $post_data['topic_last_post_id']) @@ -967,7 +967,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $post_data) $db->sql_query($sql); $forum_update_sql .= ($forum_update_sql != '') ? ', ' : ''; - $forum_update_sql .= 'forum_topics = forum_topics - 1'; + $forum_update_sql .= 'forum_topics = forum_topics - 1, forum_topics_real = forum_topics_real - 1'; } // Update Post Statistics |