From 2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 20 Nov 2012 18:14:48 -0600 Subject: [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 --- phpBB/includes/functions_privmsgs.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/functions_privmsgs.php') diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 54e8ced679..ae8ffbe90e 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -878,7 +878,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) global $db, $user, $phpbb_notifications; - $phpbb_notifications->mark_notifications_read('phpbb_notification_type_pm', $msg_id, $user_id); + $phpbb_notifications->mark_notifications_read('pm', $msg_id, $user_id); $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " SET pm_unread = 0 @@ -1096,7 +1096,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) $user->data['user_unread_privmsg'] -= $num_unread; } - $phpbb_notifications->delete_notifications('phpbb_notification_type_pm', array_keys($delete_rows)); + $phpbb_notifications->delete_notifications('pm', array_keys($delete_rows)); // Now we have to check which messages we can delete completely $sql = 'SELECT msg_id @@ -1277,7 +1277,7 @@ function phpbb_delete_users_pms($user_ids) AND ' . $db->sql_in_set('msg_id', $delivered_msg); $db->sql_query($sql); - $phpbb_notifications->delete_notifications('phpbb_notification_type_pm', $delivered_msg); + $phpbb_notifications->delete_notifications('pm', $delivered_msg); } if (!empty($undelivered_msg)) @@ -1290,7 +1290,7 @@ function phpbb_delete_users_pms($user_ids) WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg); $db->sql_query($sql); - $phpbb_notifications->delete_notifications('phpbb_notification_type_pm', $undelivered_msg); + $phpbb_notifications->delete_notifications('pm', $undelivered_msg); } } @@ -1334,7 +1334,7 @@ function phpbb_delete_users_pms($user_ids) WHERE ' . $db->sql_in_set('msg_id', $delete_ids); $db->sql_query($sql); - $phpbb_notifications->delete_notifications('phpbb_notification_type_pm', $delete_ids); + $phpbb_notifications->delete_notifications('pm', $delete_ids); } } @@ -1879,11 +1879,11 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) if ($mode == 'edit') { - $phpbb_notifications->update_notifications('phpbb_notification_type_pm', $pm_data); + $phpbb_notifications->update_notifications('pm', $pm_data); } else { - $phpbb_notifications->add_notifications('phpbb_notification_type_pm', $pm_data); + $phpbb_notifications->add_notifications('pm', $pm_data); } return $data['msg_id']; -- cgit v1.2.1