aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notification
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/notification')
-rw-r--r--phpBB/includes/notification/method/email.php4
-rw-r--r--phpBB/includes/notification/method/jabber.php8
-rw-r--r--phpBB/includes/notification/method/messenger_base.php4
3 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/includes/notification/method/email.php b/phpBB/includes/notification/method/email.php
index dc505c0d41..571b0ec656 100644
--- a/phpBB/includes/notification/method/email.php
+++ b/phpBB/includes/notification/method/email.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*
* @package notifications
*/
-class phpbb_notification_method_email extends phpbb_notification_method_base
+class phpbb_notification_method_email extends phpbb_notification_method_messenger_base
{
/**
* Get notification method name
@@ -39,7 +39,7 @@ class phpbb_notification_method_email extends phpbb_notification_method_base
*/
public function is_available()
{
- return (bool) $this->config['email_enable'];
+ return $this->config['email_enable'] && $this->user->data['user_email'];
}
/**
diff --git a/phpBB/includes/notification/method/jabber.php b/phpBB/includes/notification/method/jabber.php
index debffa8ce5..d3b756d020 100644
--- a/phpBB/includes/notification/method/jabber.php
+++ b/phpBB/includes/notification/method/jabber.php
@@ -48,7 +48,13 @@ class phpbb_notification_method_jabber extends phpbb_notification_method_messeng
*/
public function global_available()
{
- return ($this->config['jab_enable'] && @extension_loaded('xml'));
+ return !(
+ empty($this->config['jab_enable']) ||
+ empty($this->config['jab_host']) ||
+ empty($this->config['jab_username']) ||
+ empty($this->config['jab_password']) ||
+ !@extension_loaded('xml')
+ );
}
public function notify()
diff --git a/phpBB/includes/notification/method/messenger_base.php b/phpBB/includes/notification/method/messenger_base.php
index ce1ecc09ce..4966aa94bc 100644
--- a/phpBB/includes/notification/method/messenger_base.php
+++ b/phpBB/includes/notification/method/messenger_base.php
@@ -78,9 +78,9 @@ abstract class phpbb_notification_method_messenger_base extends phpbb_notificati
continue;
}
- $messenger->template($email_template_base_dir . $notification->get_email_template(), $user['user_lang']);
+ $messenger->template($template_dir_prefix . $notification->get_email_template(), $user['user_lang']);
- $messenger->to($user['user_email'], $user['username']);
+ $messenger->set_addresses($user);
$messenger->assign_vars(array_merge(array(
'USERNAME' => $user['username'],