From 216c854d1b5f22eb68ac2fad11a99c3e4acd2b93 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Apr 2007 18:32:10 +0000 Subject: [PATCH] r1526: In includes/class_notification.php#fetch_user_cache(), we no longer want to clear the roles[] array because it would actually prevent emails from being sent due to the way we use set_bug_data() in editreport.php --- docs/changes.txt | 1 + includes/class_notification.php | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index c13ca6e..42cd3c0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,6 +5,7 @@ - Fixed: In lost password reset emails, the subject would appear as "Array['trackertitle']" because the variable was not enclosed in curly braces - Fixed: On PHP4 systems, a bug in the BugAPI would prevent any data from being saved because PHP4 doesn't support call_user_func() of parent:: selectors - Change: When clicking the "[Run Search]" link in the "Saved Searches" section of the "Options" tab, force the search to rerun +- Fixed: Some email roles would not get notified under certain circumstances because the list of users to notify was reset 1.2.0 Beta 2 =============================== diff --git a/includes/class_notification.php b/includes/class_notification.php index 094cb9e..80969ae 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -139,7 +139,7 @@ class NotificationCenter $this->roles['-notapplicable-'] = (sizeof($modified) > 0 ? array($original['assignedto'], $modified['assignedto']) : array($original['assignedto'])); $this->roles['reporter'] = array($original['userid']); - $this->roles['assignee'] = (sizeof($modified) > 0 ? array($modified['assignedto']) : array($original['assignedto'])); + $this->roles['assignee'][] = (sizeof($modified) > 0 ? $modified['assignedto'] : $original['assignedto']); $this->fetch_user_cache(); } @@ -153,13 +153,6 @@ class NotificationCenter */ function fetch_user_cache() { - // reset all the data each time we do this, just in case it changes within the lifespan of the object - $this->users = array(); - foreach ($this->roles AS $role => $users) - { - $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)) { -- 2.43.5