aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_topic.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-03-19 17:01:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-03-19 17:01:59 +0000
commite461162847b1ac9287870de680e8dbd17e9f2fc1 (patch)
treee93351f9856ea56167c7c40a5c765318184df5d9 /phpBB/includes/mcp/mcp_topic.php
parentbcabff8a1fe82452366b6f278782fd284effece4 (diff)
downloadforums-e461162847b1ac9287870de680e8dbd17e9f2fc1.tar
forums-e461162847b1ac9287870de680e8dbd17e9f2fc1.tar.gz
forums-e461162847b1ac9287870de680e8dbd17e9f2fc1.tar.bz2
forums-e461162847b1ac9287870de680e8dbd17e9f2fc1.tar.xz
forums-e461162847b1ac9287870de680e8dbd17e9f2fc1.zip
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
Diffstat (limited to 'phpBB/includes/mcp/mcp_topic.php')
-rw-r--r--phpBB/includes/mcp/mcp_topic.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 931300897e..576d20b466 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -501,7 +501,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$success_msg = 'TOPIC_SPLIT_SUCCESS';
// Update forum statistics
- set_config('num_topics', $config['num_topics'] + 1, true);
+ set_config_count('num_topics', 1, true);
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');