aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_reports.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-11-23 10:16:08 -0800
committerCesar G <prototech91@gmail.com>2013-11-23 10:19:49 -0800
commita6a23784c37862100d69c49244ee68097e6277d0 (patch)
tree155dfd5a1290f885eb9e2eb8e3629b0e94d987f8 /phpBB/includes/mcp/mcp_reports.php
parent0d0b2627f723c3003af0ea301511a972008e7734 (diff)
downloadforums-a6a23784c37862100d69c49244ee68097e6277d0.tar
forums-a6a23784c37862100d69c49244ee68097e6277d0.tar.gz
forums-a6a23784c37862100d69c49244ee68097e6277d0.tar.bz2
forums-a6a23784c37862100d69c49244ee68097e6277d0.tar.xz
forums-a6a23784c37862100d69c49244ee68097e6277d0.zip
[ticket/11963] Don't depend on user_notify flag to delete report notifications.
PHPBB3-11963
Diffstat (limited to 'phpBB/includes/mcp/mcp_reports.php')
-rw-r--r--phpBB/includes/mcp/mcp_reports.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 8db5bb9727..566284e411 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -615,23 +615,25 @@ function close_report($report_id_list, $mode, $action, $pm = false)
}
unset($close_report_posts, $close_report_topics);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
foreach ($reports as $report)
{
if ($pm)
{
add_log('mod', 0, 0, 'LOG_PM_REPORT_' . strtoupper($action) . 'D', $post_info[$report['pm_id']]['message_subject']);
+ $phpbb_notifications->delete_notifications('report_pm', $report['pm_id']);
}
else
{
add_log('mod', $post_info[$report['post_id']]['forum_id'], $post_info[$report['post_id']]['topic_id'], 'LOG_REPORT_' . strtoupper($action) . 'D', $post_info[$report['post_id']]['post_subject']);
+ $phpbb_notifications->delete_notifications('report_post', $report['post_id']);
}
}
// Notify reporters
if (sizeof($notify_reporters))
{
- $phpbb_notifications = $phpbb_container->get('notification_manager');
-
foreach ($notify_reporters as $report_id => $reporter)
{
if ($reporter['user_id'] == ANONYMOUS)
@@ -648,8 +650,6 @@ function close_report($report_id_list, $mode, $action, $pm = false)
'closer_id' => $user->data['user_id'],
'from_user_id' => $post_info[$post_id]['author_id'],
)));
-
- $phpbb_notifications->delete_notifications('report_pm', $post_id);
}
else
{
@@ -657,8 +657,6 @@ function close_report($report_id_list, $mode, $action, $pm = false)
'reporter' => $reporter['user_id'],
'closer_id' => $user->data['user_id'],
)));
-
- $phpbb_notifications->delete_notifications('report_post', $post_id);
}
}
}