r1473: Because we didn't understand the return val of eval() all our notifications...
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 17 Mar 2007 18:42:26 +0000 (18:42 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 17 Mar 2007 18:42:26 +0000 (18:42 +0000)
docs/changes.txt
includes/class_notification.php

index f53e3991ba0537d49407b5255844092e05e64ed1..f11ea2482e8477e708280ebca3cf17cded9c2ad2 100644 (file)
@@ -4,6 +4,7 @@
 - Fixed: Searches wouldn't be rerun after 15 minutes because of a typo in the time calculation
 - Fixed: The installer would show an error if gettext wasn't installed because the emulator wasn't loaded early enough
 - Fixed: Close a large bug that would cause a PHP error to be thrown regarding string offsets during notification processing
+- Fixed: Email notifications would be essentially empty in all circumstances
 
 1.2.0 Beta 1
 ===============================
index 1d4184c796018a2a18f273e62318c4f171718759..094cb9e99dad04adbcbeaef22f56313923c0f61e 100644 (file)
@@ -288,7 +288,8 @@ class NotificationCenter
                if ($this->users["$userid"]['options'][0] & $this->registry->emailoptions['notifications']['assignedto'] AND in_array($userid, $this->roles['-notapplicable-']))
                {
                        $user = construct_user_display($this->registry->userinfo, false);
-                       $this->notices["$userid"][] = eval('$part = "' . $this->registry->template->fetch('email/notice_unassigned.part') . '";');
+                       eval('$part = "' . $this->registry->template->fetch('email/notice_unassigned.part') . '";');
+                       $this->notices["$userid"][] = $part;
                }
        }
        
@@ -305,7 +306,8 @@ class NotificationCenter
                if ($this->users["$userid"]['options'][0] & $this->registry->emailoptions['notifications']['assignedto'] AND in_array($userid, $this->roles['-notapplicable-']))
                {
                        $user = construct_user_display($this->registry->userinfo, false);
-                       $this->notices["$userid"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_assigned.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_assigned.part') . '";');
+                       $this->notices["$userid"][] = $email;
                }
        }
        
@@ -323,7 +325,8 @@ class NotificationCenter
                $userlist = $this->fetch_users_with_on_bit('statusresolve');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_status.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_status.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -341,7 +344,8 @@ class NotificationCenter
                $userlist = $this->fetch_users_with_on_bit('statusresolve');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_resolution.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_resolution.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -359,7 +363,8 @@ class NotificationCenter
                $userlist = $this->fetch_useres_with_on_bit('duplicates');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_duplicates.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_duplicates.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -377,7 +382,8 @@ class NotificationCenter
                $userlist = $this->fetch_users_with_on_bit('otherfield');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_severity.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_severity.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -395,7 +401,8 @@ class NotificationCenter
                $userlist = $this->fetch_users_with_on_bit('otherfield');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_priority.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_priority.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -419,7 +426,8 @@ class NotificationCenter
                
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_product.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_product.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -440,7 +448,8 @@ class NotificationCenter
                        $user = construct_user_display($this->registry->userinfo, false);
                        $date = $this->registry->modules['date']->format($this->registry->options['dateformat'], $comment['dateline']);
                        
-                       $this->notices["$userid"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_comment.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_comment.part') . '";');
+                       $this->notices["$userid"][] = $email;
                }
        }
        
@@ -459,7 +468,8 @@ class NotificationCenter
                $userlist = $this->fetch_users_with_on_bit('otherfield');
                foreach ($userlist AS $userid => $user)
                {
-                       $this->notices["$user[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_other.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_other.part') . '";');
+                       $this->notices["$user[userid]"][] = $email;
                }
        }
        
@@ -482,7 +492,8 @@ class NotificationCenter
                        $user = construct_user_display($this->registry->userinfo, false);
                        $obsoletes = implode(', ', (array)$obsolete);
                        
-                       $this->notices["$userid"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_attachment.part') . '";');
+                       eval('$email = "' . $this->registry->template->fetch('email/notice_attachment.part') . '";');
+                       $this->notices["$userid"][] = $email;
                }
        }
        
@@ -513,7 +524,8 @@ class NotificationCenter
                        {
                                $user = construct_user_display($this->registry->userinfo, false);
                                $product = $this->registry->datastore['product']["$bug[product]"]['title'] . '/' . ($bug['component'] ? $this->registry->datastore['product']["$bug[component]"]['title'] . '/' : '') . $this->registry->datastore['version']["$bug[version]"]['version'];
-                               $this->notices["$userInfo[userid]"][] = eval('$email = "' . $this->registry->template->fetch('email/notice_new_bug.part') . '";');
+                               eval('$email = "' . $this->registry->template->fetch('email/notice_new_bug.part') . '";');
+                               $this->notices["$userInfo[userid]"][] = $email;
                                $this->users["$userInfo[userid]"] = $userInfo;
                                unset($this->users["$userInfo[userid]"]['mask'], $this->users["$userInfo[userid]"]['relation']);
                        }