mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
Merge branch '3.1.x'
* 3.1.x: [ticket/9252] Do not try to disapprove a post that was just approved
This commit is contained in:
commit
326ba5325b
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user