1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 13:30:25 +02:00

[feature/soft-delete] Fix some more topic/post count handling

Only disapproving in queue is missing.

PHPBB3-9567
This commit is contained in:
Joas Schilling
2012-10-23 15:30:52 +02:00
parent fec72c4b78
commit 43e6b3a921
4 changed files with 9 additions and 20 deletions

View File

@@ -1491,8 +1491,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
// counting is fun! we only have to do sizeof($forum_ids) number of queries,
// even if the topic is moved back to where its shadow lives (we count how many times it is in a forum)
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_topics_real = forum_topics_real - ' . $topic_count . ',
forum_topics = forum_topics - ' . $topic_count . '
SET forum_topics = forum_topics - ' . $topic_count . '
WHERE forum_id = ' . $updated_forum;
$db->sql_query($sql);
update_post_information('forum', $updated_forum);