r1526: In includes/class_notification.php#fetch_user_cache(), we no longer want to...
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 2 Apr 2007 18:32:10 +0000 (18:32 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 2 Apr 2007 18:32:10 +0000 (18:32 +0000)
docs/changes.txt
includes/class_notification.php

index c13ca6ea99a432556ff5b9ab9c2464d564b5872f..42cd3c02de672c0167c2dee7e761c6d3b04c0096 100644 (file)
@@ -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
 ===============================
index 094cb9e99dad04adbcbeaef22f56313923c0f61e..80969ae45c56af57f0d021be6fb786794070673e 100644 (file)
@@ -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))
                {