1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +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:
Meik Sievertsen
2009-03-19 17:01:59 +00:00
parent bcabff8a1f
commit e461162847
10 changed files with 58 additions and 26 deletions

View File

@@ -1194,8 +1194,8 @@ function mcp_fork_topic($topic_ids)
}
sync('forum', 'forum_id', $to_forum_id);
set_config('num_topics', $config['num_topics'] + sizeof($new_topic_id_list), true);
set_config('num_posts', $config['num_posts'] + $total_posts, true);
set_config_count('num_topics', sizeof($new_topic_id_list), true);
set_config_count('num_posts', $total_posts, true);
foreach ($new_topic_id_list as $topic_id => $new_topic_id)
{