From 04499af9e491afe399da0685473da1a5cbf1e68a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 25 Nov 2006 01:13:58 +0000 Subject: [PATCH] r1324: Merging r1323 from trunk --- includes/class_notification.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/includes/class_notification.php b/includes/class_notification.php index a875e89..69f5697 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -160,6 +160,12 @@ class NotificationCenter $this->roles["$role"] = array(); } + $newbuggers = $this->registry->db->query("SELECT userid FROM " . TABLE_PREFIX . "useremail WHERE relation = " . $this->registry->emailoptions['relations']['-notapplicable-'] . " AND mask & " . $this->registry->emailoptions['notifications']['newbug']); + while ($newbug = $this->registry->db->fetch_array($newbuggers)) + { + $this->roles['-notapplicable-']["$newbug[userid]"] = $newbug['userid']; + } + $favorites = $this->registry->db->query("SELECT userid FROM " . TABLE_PREFIX . "favorite WHERE bugid = " . $this->registry->clean($this->bug['bugid'], TYPE_UINT)); while ($fav = $this->registry->db->fetch_array($favorites)) { @@ -688,7 +694,14 @@ If you no longer want to receive email from us, please log into your account and $this->bug['summary'], $this->bug['bugid'] )); - $this->registry->mail->send($this->users["$userid"]['email'], $this->users["$userid"]['displayname']); + if (!empty($this->users["$userid"]['email'])) + { + $this->registry->mail->send($this->users["$userid"]['email'], $this->users["$userid"]['displayname']); + } + else + { + $this->registry->debug("not sending an email to " . $userid . " because they don't have one?"); + } } } } -- 2.22.5