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

[ticket/11103] Create user loader class, update for DIC

Create a very basic user loader class to handle querying/storing
user data in a centralized location.

Use DIC collection service for notification types/methods.

Cleanup unused dependencies.

Fix some other issues.

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-11-20 18:14:48 -06:00
parent d2187424da
commit 2afb8b9df8
30 changed files with 518 additions and 325 deletions

View File

@@ -88,7 +88,7 @@ class mcp_reports
trigger_error('NO_REPORT');
}
$phpbb_notifications->mark_notifications_read('phpbb_notification_type_report_post', $post_id, $user->data['user_id']);
$phpbb_notifications->mark_notifications_read('report_post', $post_id, $user->data['user_id']);
if (!$report_id && $report['report_closed'])
{
@@ -647,20 +647,20 @@ function close_report($report_id_list, $mode, $action, $pm = false)
if ($pm)
{
$phpbb_notifications->add_notifications('phpbb_notification_type_report_pm_closed', array_merge($post_info[$post_id], array(
$phpbb_notifications->add_notifications('report_pm_closed', array_merge($post_info[$post_id], array(
'reporter' => $reporter['user_id'],
'closer_id' => $user->data['user_id'],
'from_user_id' => $post_info[$post_id]['author_id'],
)));
$phpbb_notifications->delete_notifications('phpbb_notification_type_report_pm', $post_id);
$phpbb_notifications->delete_notifications('report_pm', $post_id);
}
else
{
$phpbb_notifications->add_notifications('phpbb_notification_type_report_post_closed', array_merge($post_info[$post_id], array(
$phpbb_notifications->add_notifications('report_post_closed', array_merge($post_info[$post_id], array(
'reporter' => $reporter['user_id'],
'closer_id' => $user->data['user_id'],
)));
$phpbb_notifications->delete_notifications('phpbb_notification_type_report_post', $post_id);
$phpbb_notifications->delete_notifications('report_post', $post_id);
}
}
}