diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-05-30 12:27:00 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-05-30 12:27:00 +0200 |
commit | e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d (patch) | |
tree | a0fe7d603d523b0cd78041ecc5f2774bcce6a13e /phpBB/includes | |
parent | df4b391baadd3b9194062a4907ef4b55b265ffab (diff) | |
download | forums-e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d.tar forums-e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d.tar.gz forums-e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d.tar.bz2 forums-e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d.tar.xz forums-e04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d.zip |
[ticket/9252] Do not try to disapprove a post that was just approved
Without this change, posts that are approved by someone right before
another moderator is trying to disapprove a post are actually deleted
instead of disapproved.
PHPBB3-9252
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 82c3bc9ab0..99f0d7155f 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -1130,6 +1130,11 @@ class mcp_queue // Build a list of posts to be disapproved and get the related topics real replies count foreach ($post_info as $post_id => $post_data) { + if ($mode === 'unapproved_topics' && $post_data['post_visibility'] == ITEM_APPROVED) + { + continue; + } + $post_disapprove_list[$post_id] = $post_data['topic_id']; if (!isset($topic_posts_unapproved[$post_data['topic_id']])) { @@ -1139,6 +1144,12 @@ class mcp_queue $topic_posts_unapproved[$post_data['topic_id']]++; } + // Do not try to disapprove if no posts are selected + if (empty($post_disapprove_list)) + { + trigger_error('NO_POST_SELECTED'); + } + // Now we build the log array foreach ($post_disapprove_list as $post_id => $topic_id) { |