aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notifications/method
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-09-09 10:36:22 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-09-09 10:36:22 -0500
commitff45c9aa7c077fc0a03c64764917d1efcccf48f4 (patch)
treef94942b4ae5d59f56ba4704e9f0552ff6f6e546c /phpBB/includes/notifications/method
parent4b4ea7c5cde7c9f3684ca325c110f81eda593d67 (diff)
downloadforums-ff45c9aa7c077fc0a03c64764917d1efcccf48f4.tar
forums-ff45c9aa7c077fc0a03c64764917d1efcccf48f4.tar.gz
forums-ff45c9aa7c077fc0a03c64764917d1efcccf48f4.tar.bz2
forums-ff45c9aa7c077fc0a03c64764917d1efcccf48f4.tar.xz
forums-ff45c9aa7c077fc0a03c64764917d1efcccf48f4.zip
[ticket/11103] General notification email template.
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/notifications/method')
-rw-r--r--phpBB/includes/notifications/method/base.php13
-rw-r--r--phpBB/includes/notifications/method/email.php15
-rw-r--r--phpBB/includes/notifications/method/interface.php2
3 files changed, 9 insertions, 21 deletions
diff --git a/phpBB/includes/notifications/method/base.php b/phpBB/includes/notifications/method/base.php
index 3ed9d3f33c..b860fcffda 100644
--- a/phpBB/includes/notifications/method/base.php
+++ b/phpBB/includes/notifications/method/base.php
@@ -83,19 +83,8 @@ abstract class phpbb_notifications_method_base implements phpbb_notifications_me
}
/**
- * Basic run queue function.
- * Child methods should override this function if there are more efficient methods to mass-notification
+ * Empty the queue
*/
- public function run_queue()
- {
- foreach ($this->queue as $notification)
- {
- $this->notify($notification);
- }
-
- $this->empty_queue();
- }
-
protected function empty_queue()
{
$this->queue = array();
diff --git a/phpBB/includes/notifications/method/email.php b/phpBB/includes/notifications/method/email.php
index 50df9a6c56..69546be73f 100644
--- a/phpBB/includes/notifications/method/email.php
+++ b/phpBB/includes/notifications/method/email.php
@@ -33,12 +33,7 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
return true;
}
- public function notify($notification)
- {
- // email the user
- }
-
- public function run_queue()
+ public function notify()
{
if (!sizeof($this->queue))
{
@@ -80,14 +75,18 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
$user = $this->service->get_user($notification->user_id);
- $messenger->template('privmsg_notify', $user['user_lang']);
+ $messenger->template('notification', $user['user_lang']);
$messenger->to($user['user_email'], $user['username']);
$messenger->assign_vars(array(
- 'SUBJECT' => htmlspecialchars_decode($notification->get_title()),
+ 'USERNAME' => $user['username'],
+
+ 'MESSAGE' => htmlspecialchars_decode($notification->get_title()),
'U_VIEW_MESSAGE' => $notification->get_full_url(),
+
+ 'U_UNSUBSCRIBE' => $notification->get_unsubscribe_url(),
));
$messenger->send('email');
diff --git a/phpBB/includes/notifications/method/interface.php b/phpBB/includes/notifications/method/interface.php
index f18d005b8b..7d7f3abcd0 100644
--- a/phpBB/includes/notifications/method/interface.php
+++ b/phpBB/includes/notifications/method/interface.php
@@ -21,5 +21,5 @@ if (!defined('IN_PHPBB'))
*/
interface phpbb_notifications_method_interface
{
- public function notify($notification);
+ public function notify();
}