aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_posting.php3
-rw-r--r--phpBB/includes/mcp/mcp_main.php22
-rw-r--r--phpBB/includes/mcp/mcp_queue.php2
3 files changed, 9 insertions, 18 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 7962690ca8..473149a8ec 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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);
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 6245a1b32b..99b23e9db1 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -1097,23 +1097,15 @@ function mcp_fork_topic($topic_ids)
}
// Sync new topics, parent forums and board stats
- sync('topic', 'topic_id', $new_topic_id_list);
-
- $sync_sql = array();
-
- $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $total_posts;
- $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . sizeof($new_topic_id_list);
- $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . sizeof($new_topic_id_list);
-
- foreach ($sync_sql as $forum_id_key => $array)
- {
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET ' . implode(', ', $array) . '
- WHERE forum_id = ' . $forum_id_key;
- $db->sql_query($sql);
- }
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_posts = forum_posts + ' . $total_posts . ',
+ forum_topics = forum_topics + ' . sizeof($new_topic_id_list) . '
+ WHERE forum_id = ' . $to_forum_id;
+ $db->sql_query($sql);
+ sync('topic', 'topic_id', $new_topic_id_list);
sync('forum', 'forum_id', $to_forum_id);
+
set_config_count('num_topics', sizeof($new_topic_id_list), true);
set_config_count('num_posts', $total_posts, true);
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 3d36229ee7..c954edacb2 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -895,7 +895,7 @@ class mcp_queue
$disapprove_log = $disapprove_log_topics = $disapprove_log_posts = array();
$topic_replies_real = $post_disapprove_list = array();
- // Build a list of posts to be unapproved and get the related topics real replies count
+ // Build a list of posts to be disapproved and get the related topics real replies count
foreach ($post_info as $post_id => $post_data)
{
$post_disapprove_list[$post_id] = $post_data['topic_id'];