mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
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
This commit is contained in:
commit
dfd5ec6835
1 changed files with 11 additions and 0 deletions
|
@ -1131,6 +1131,11 @@ class mcp_queue
|
||||||
// Build a list of posts to be disapproved 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)
|
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'];
|
$post_disapprove_list[$post_id] = $post_data['topic_id'];
|
||||||
if (!isset($topic_posts_unapproved[$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']]++;
|
$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
|
// Now we build the log array
|
||||||
foreach ($post_disapprove_list as $post_id => $topic_id)
|
foreach ($post_disapprove_list as $post_id => $topic_id)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue