1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/11103] Instantiate $phpbb_notifications as needed

https://github.com/phpbb/phpbb3/pull/992#discussion_r2413976

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-12-13 19:19:40 -06:00
parent 84284a9cce
commit 249f3c8885
12 changed files with 69 additions and 34 deletions

View File

@@ -33,8 +33,7 @@ class mcp_pm_reports
function main($id, $mode)
{
global $auth, $db, $user, $template, $cache;
global $config, $phpbb_root_path, $phpEx, $action;
global $phpbb_notifications;
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
@@ -90,6 +89,8 @@ class mcp_pm_reports
trigger_error('NO_REPORT');
}
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->mark_notifications_read_by_parent('report_pm', $report_id, $user->data['user_id']);
$pm_id = $report['pm_id'];