diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-12-30 11:04:43 -0800 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-12-30 11:04:43 -0800 |
| commit | be67124dc7d5461c9b085e4dc3f32ece87e4b1aa (patch) | |
| tree | c65ec32dc4cd23154ed0b289ce4bd17cc2a31614 /phpBB/includes/mcp/mcp_reports.php | |
| parent | 34c3e74c16b6e7455733d7ba41494c38d753618e (diff) | |
| parent | 3da445ada4a8de1f50a004c074e2a4befb9fc040 (diff) | |
| download | forums-be67124dc7d5461c9b085e4dc3f32ece87e4b1aa.tar forums-be67124dc7d5461c9b085e4dc3f32ece87e4b1aa.tar.gz forums-be67124dc7d5461c9b085e4dc3f32ece87e4b1aa.tar.bz2 forums-be67124dc7d5461c9b085e4dc3f32ece87e4b1aa.tar.xz forums-be67124dc7d5461c9b085e4dc3f32ece87e4b1aa.zip | |
Merge pull request #1889 from prototech/ticket/11963
[ticket/11963] Remove stale MCP notifications.
Diffstat (limited to 'phpBB/includes/mcp/mcp_reports.php')
| -rw-r--r-- | phpBB/includes/mcp/mcp_reports.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 02892964f1..954f8a8349 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -616,23 +616,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) @@ -649,8 +651,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 { @@ -658,8 +658,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); } } } |
