mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
Fix race condition for updating post/topic/etc. counter. (reported by BartVB)
please do not try such fixes at home - the correct solution would be to create a second config table with integer columns. ;) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9398 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -663,12 +663,12 @@ function approve_post($post_id_list, $id, $mode)
|
||||
|
||||
if ($total_topics)
|
||||
{
|
||||
set_config('num_topics', $config['num_topics'] + $total_topics, true);
|
||||
set_config_count('num_topics', $total_topics, true);
|
||||
}
|
||||
|
||||
if ($total_posts)
|
||||
{
|
||||
set_config('num_posts', $config['num_posts'] + $total_posts, true);
|
||||
set_config_count('num_posts', $total_posts, true);
|
||||
}
|
||||
unset($topic_approve_sql, $topic_replies_sql, $post_approve_sql);
|
||||
|
||||
|
Reference in New Issue
Block a user