1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11103] The service now handles all user loading itself

Delete pm notifications when pms are deleted

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-09-09 10:19:46 -05:00
parent 2fb9f2ce6a
commit 4b4ea7c5cd
7 changed files with 155 additions and 223 deletions

View File

@@ -59,14 +59,8 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
}
$banned_users = phpbb_get_banned_user_ids($user_ids);
$sql = 'SELECT * FROM ' . USERS_TABLE . '
WHERE ' . $this->db->sql_in_set('user_id', $user_ids);
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
$users[$row['user_id']] = $row;
}
$this->db->sql_freeresult($result);
// Load all the users we need
$this->service->load_users($user_ids);
// Load the messenger
if (!class_exists('messenger'))
@@ -84,9 +78,7 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
continue;
}
$notification->users($users);
$user = $notification->get_user($notification->user_id);
$user = $this->service->get_user($notification->user_id);
$messenger->template('privmsg_notify', $user['user_lang']);