SOURCES: eventum-email-notify-display.patch - avoid operating on n...

glen glen at pld-linux.org
Thu Sep 21 20:08:26 CEST 2006


Author: glen                         Date: Thu Sep 21 18:08:26 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- avoid operating on null array

---- Files affected:
SOURCES:
   eventum-email-notify-display.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/eventum-email-notify-display.patch
diff -u SOURCES/eventum-email-notify-display.patch:1.4 SOURCES/eventum-email-notify-display.patch:1.5
--- SOURCES/eventum-email-notify-display.patch:1.4	Mon Sep  4 13:49:12 2006
+++ SOURCES/eventum-email-notify-display.patch	Thu Sep 21 20:08:21 2006
@@ -1,6 +1,6 @@
---- eventum-20060829/include/class.notification.php	2006-08-30 00:46:18.937413896 +0300
-+++ eventum-20060830/include/class.notification.php	2006-08-30 20:17:25.074832296 +0300
-@@ -853,6 +853,26 @@
+--- eventum-20060830/include/class.notification.php	2006-08-30 20:17:25.074832296 +0300
++++ eventum/include/class.notification.php	2006-09-21 20:59:32.125474606 +0300
+@@ -853,6 +853,30 @@
          }
      }
  
@@ -15,6 +15,10 @@
 +    {
 +        global $_EVENTUM_LAST_NOTIFIED_LIST;
 +
++        if (is_null($_EVENTUM_LAST_NOTIFIED_LIST)) {
++            return null;
++        }
++
 +        if (is_null($issue_id)) {
 +            // return all addresses in flat view
 +            return array_values($_EVENTUM_LAST_NOTIFIED_LIST);
@@ -27,7 +31,7 @@
  
      /**
       * Method used to format and send the email notifications.
-@@ -869,6 +889,8 @@
+@@ -869,6 +893,8 @@
       */
      function notifySubscribers($issue_id, $emails, $type, $data, $subject, $internal_only, $type_id = false, $headers = false)
      {
@@ -36,7 +40,7 @@
          // open text template
          $tpl = new Template_API;
          $tpl->setTemplate('notifications/' . $type . '.tpl.text');
-@@ -954,6 +976,8 @@
+@@ -954,6 +980,8 @@
                  $full_subject = "[#$issue_id] $subject: $extra_subject";
              }
              $mail->send($from, $emails[$i], $full_subject, TRUE, $issue_id, $final_type, $sender_usr_id, $type_id);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/eventum-email-notify-display.patch?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list