aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/notifications')
-rw-r--r--phpBB/includes/notifications/method/email.php8
-rw-r--r--phpBB/includes/notifications/service.php11
-rw-r--r--phpBB/includes/notifications/type/base.php2
3 files changed, 9 insertions, 12 deletions
diff --git a/phpBB/includes/notifications/method/email.php b/phpBB/includes/notifications/method/email.php
index 725ede7913..0120485cff 100644
--- a/phpBB/includes/notifications/method/email.php
+++ b/phpBB/includes/notifications/method/email.php
@@ -29,7 +29,7 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
return true;
}
- public function notify()
+ public function notify($notification)
{
// email the user
}
@@ -70,7 +70,7 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
{
$notification->users($users);
- $user = $notification->get_user();
+ $user = $notification->get_user($notification->user_id);
$messenger->template('privmsg_notify', $user['user_lang']);
@@ -82,10 +82,10 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
'USERNAME' => htmlspecialchars_decode($user['username']),
'U_INBOX' => $board_url . "/ucp.{$this->php_ext}?i=pm&folder=inbox",
- 'U_VIEW_MESSAGE' => $board_url . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$notification->get_item_id()}",
+ 'U_VIEW_MESSAGE' => $board_url . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$notification->item_id}",
));
- $messenger->send($addr['method']);
+ $messenger->send('email');
}
// Save the queue in the messenger class (has to be called or these emails could be lost?)
diff --git a/phpBB/includes/notifications/service.php b/phpBB/includes/notifications/service.php
index a689e1c68a..74e2e29e1a 100644
--- a/phpBB/includes/notifications/service.php
+++ b/phpBB/includes/notifications/service.php
@@ -172,15 +172,14 @@ class phpbb_notifications_service
foreach ($methods as $method)
{
// setup the notification methods and add the notification to the queue
- if ($row['method'])
+ if ($method)
{
- if (!isset($notification_methods[$row['method']]))
+ if (!isset($notification_methods[$method]))
{
- $method_class_name = 'phpbb_notifications_method_' . $row['method'];
- $notification_methods[$row['method']] = new $method_class_name();
+ $method_class_name = 'phpbb_notifications_method_' . $method;
+ $notification_methods[$method] = new $method_class_name($this->phpbb_container);
}
-
- $notification_methods[$row['method']]->add_to_queue($notification);
+ $notification_methods[$method]->add_to_queue($notification);
}
}
}
diff --git a/phpBB/includes/notifications/type/base.php b/phpBB/includes/notifications/type/base.php
index f031abae77..32d8f58ff3 100644
--- a/phpBB/includes/notifications/type/base.php
+++ b/phpBB/includes/notifications/type/base.php
@@ -37,7 +37,6 @@ abstract class phpbb_notifications_type_base implements phpbb_notifications_type
/**
* Indentification data
- * notification_id
* item_type
* item_id
* user_id
@@ -141,7 +140,6 @@ abstract class phpbb_notifications_type_base implements phpbb_notifications_type
'URL' => $this->get_url(),
'TIME' => $user->format_date($this->time),
- 'ID' => $this->notification_id,
'UNREAD' => $this->unread,
));
}