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

[ticket/11103] Use dependency injection instead of phpbb_container

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-10-04 14:27:43 -05:00
parent 64820546d7
commit cea94d8984
18 changed files with 204 additions and 218 deletions

View File

@@ -57,12 +57,12 @@ class phpbb_notification_method_email extends phpbb_notification_method_base
// We do not send emails to banned users
if (!function_exists('phpbb_get_banned_user_ids'))
{
include($this->phpbb_container->getParameter('core.root_path') . 'includes/functions_user.' . $this->phpbb_container->getParameter('core.php_ext'));
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
}
$banned_users = phpbb_get_banned_user_ids($user_ids);
// Load all the users we need
$this->service->load_users($user_ids);
$this->notification_manager->load_users($user_ids);
// Load the messenger
if (!class_exists('messenger'))
@@ -75,7 +75,7 @@ class phpbb_notification_method_email extends phpbb_notification_method_base
// Time to go through the queue and send emails
foreach ($this->queue as $notification)
{
$user = $this->service->get_user($notification->user_id);
$user = $this->notification_manager->get_user($notification->user_id);
if ($user['user_type'] == USER_IGNORE || in_array($notification->user_id, $banned_users))
{