diff options
Diffstat (limited to 'phpBB/includes/mcp')
| -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 132786818b..cb4b590196 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -1148,6 +1148,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']]))  				{ @@ -1157,6 +1162,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)  			{ | 
