aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_queue.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:36:51 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:36:51 +0200
commitdfd5ec6835f7cd4dd9a248c8a55da35c2032d98c (patch)
tree0341783b70df7936c525a3840de08767615778c4 /phpBB/includes/mcp/mcp_queue.php
parent9ccb596a06f72a6e172d6d421754b636cbbb41d5 (diff)
parente04f9a2425a59e3ef20bc2e962ee09b2b22c7f8d (diff)
downloadforums-dfd5ec6835f7cd4dd9a248c8a55da35c2032d98c.tar
forums-dfd5ec6835f7cd4dd9a248c8a55da35c2032d98c.tar.gz
forums-dfd5ec6835f7cd4dd9a248c8a55da35c2032d98c.tar.bz2
forums-dfd5ec6835f7cd4dd9a248c8a55da35c2032d98c.tar.xz
forums-dfd5ec6835f7cd4dd9a248c8a55da35c2032d98c.zip
Merge pull request #3666 from marc1706/ticket/9252
[ticket/9252] Do not try to disapprove a post that was just approved * marc1706/ticket/9252: [ticket/9252] Do not try to disapprove a post that was just approved
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 60c6e5d877..4b3e16d713 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -1131,6 +1131,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']]))
{
@@ -1140,6 +1145,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)
{