From 76982b430f8417c5930905f96ea42cd4c34ca6d7 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Thu, 26 Jul 2018 15:42:44 +0200 Subject: [ticket/11453] Improve performance of notification.method.messenger_base PHPBB3-11453 --- phpBB/phpbb/notification/method/messenger_base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/notification/method') diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php index 32e79aa936..f82017b70e 100644 --- a/phpBB/phpbb/notification/method/messenger_base.php +++ b/phpBB/phpbb/notification/method/messenger_base.php @@ -87,7 +87,7 @@ abstract class messenger_base extends \phpbb\notification\method\base $banned_users = phpbb_get_banned_user_ids($user_ids); // Load all the users we need - $this->user_loader->load_users($user_ids); + $this->user_loader->load_users(array_diff($user_ids, $banned_users), array(USER_IGNORE)); // Load the messenger if (!class_exists('messenger')) @@ -107,7 +107,7 @@ abstract class messenger_base extends \phpbb\notification\method\base $user = $this->user_loader->get_user($notification->user_id); - if ($user['user_type'] == USER_IGNORE || ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL) || in_array($notification->user_id, $banned_users)) + if ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL) { continue; } -- cgit v1.2.1 From 175ffa869be0d353156e2e332136f63ade30a043 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Thu, 18 Oct 2018 13:01:29 +0200 Subject: [ticket/15850] Fix "Duplicate entry" for notification types PHPBB3-15850 --- phpBB/phpbb/notification/method/board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/notification/method') diff --git a/phpBB/phpbb/notification/method/board.php b/phpBB/phpbb/notification/method/board.php index 931b252daa..faa53576e0 100644 --- a/phpBB/phpbb/notification/method/board.php +++ b/phpBB/phpbb/notification/method/board.php @@ -394,6 +394,6 @@ class board extends \phpbb\notification\method\base WHERE notification_type_id = ' . (int) $notification_type_id; $this->db->sql_query($sql); - $this->cache->destroy('notification_type_ids'); + $this->cache->destroy('sql', $this->notification_types_table); } } -- cgit v1.2.1 From 304750a88b5a1c20cbfebbe97f71c65cd464d374 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 18 Dec 2018 21:07:41 +0100 Subject: [ticket/15911] Resolve warnings when updating from 3.0.0 to latest PHPBB3-15911 --- phpBB/phpbb/notification/method/email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/notification/method') diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php index 56dd1e9367..6376d13dc7 100644 --- a/phpBB/phpbb/notification/method/email.php +++ b/phpBB/phpbb/notification/method/email.php @@ -65,7 +65,7 @@ class email extends \phpbb\notification\method\messenger_base */ public function is_available(type_interface $notification_type = null) { - return parent::is_available($notification_type) && $this->config['email_enable'] && $this->user->data['user_email']; + return parent::is_available($notification_type) && $this->config['email_enable'] && !empty($this->user->data['user_email']); } /** -- cgit v1.2.1