]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum-bounce-notes.patch
- update to r3569, add databasse update trigger
[packages/eventum.git] / eventum-bounce-notes.patch
index 000b866a02e39c37a2f50a21323fb7b1d0ff3446..e97394b1bc804c789280c67c4036eed9c2bd4693 100644 (file)
@@ -1,8 +1,21 @@
-Index: include/class.support.php
-===================================================================
---- include/class.support.php  (revision 3290)
-+++ include/class.support.php  (working copy)
-@@ -456,6 +461,50 @@
+TODO:
+
+
+02:32:31  lordrashmi> drafts are restricted too
+02:33:14  lordrashmi> the delete thing will be a problem
+02:34:25  lordrashmi> we need some way to indicate that a message has been processed
+
+
+22:55:08  lordrashmi> glen_: Only thing I can think of for that mail issue is a seperate table
+22:55:14  lordrashmi> and record the message ID in it
+22:55:17  lordrashmi> and possible the error
+23:01:52  lordrashmi> eventum_bounce
+23:02:21  lordrashmi> bon_id, bon_message_id, bon_error
+
+
+--- include/class.support.php  (working copy)
++++ include/class.support.php  2007-04-03 01:53:39.881559822 +0300
+@@ -461,6 +461,50 @@
  
  
      /**
@@ -13,7 +26,7 @@ Index: include/class.support.php
 +     * @param   array   array(ERROR_CODE, ERROR_STRING) of error to bounce
 +     * @return  void
 +     */
-+    function BounceEmail($message, $error)
++    function bounceMessage($message, $error)
 +    {
 +        // open text template
 +        $tpl = new Template_API;
@@ -53,49 +66,49 @@ Index: include/class.support.php
       * Method used to get the information about a specific message
       * from a given mailbox.
       *
-@@ -531,10 +580,11 @@
-                     $res = Routing::getMatchingIssueIDs($addresses, 'email');
-                     if ($res != false) {
-                         $return = Routing::route_emails($message);
--                        if ($return == true) {
-+                        if ($return === true) {
-                             Support::deleteMessage($info, $mbox, $num);
-                             return;
-                         }
-+                        // TODO: handle errors?
+@@ -536,10 +580,11 @@
+                 $res = Routing::getMatchingIssueIDs($addresses, 'email');
+                 if ($res != false) {
+                     $return = Routing::route_emails($message);
+-                    if ($return == true) {
++                    if ($return === true) {
+                         Support::deleteMessage($info, $mbox, $num);
                          return;
                      }
++                    // TODO: handle errors?
+                     return;
                  }
-@@ -542,10 +592,13 @@
-                     $res = Routing::getMatchingIssueIDs($addresses, 'note');
-                     if ($res != false) {
-                         $return = Routing::route_notes($message);
--                        if ($return == true) {
-+                        if ($return === true) {
-                             Support::deleteMessage($info, $mbox, $num);
-                             return;
-                         }
-+
-+                        // create bounce
-+                        Support::BounceEmail($email, $return);
-                         return;
+             }
+@@ -547,10 +592,13 @@
+                 $res = Routing::getMatchingIssueIDs($addresses, 'note');
+                 if ($res != false) {
+                     $return = Routing::route_notes($message);
+-                    if ($return == true) {
+-                        Support::deleteMessage($info, $mbox, $num);
+-                        return;
++                    if ($return !== true) {
++                        // in case of error, create bounce, but still
++                        // delete email not to send bounce in next process :)
++                        Support::bounceMessage($email, $return);
                      }
++
++                    Support::deleteMessage($info, $mbox, $num);
+                     return;
                  }
-@@ -553,10 +606,11 @@
-                     $res = Routing::getMatchingIssueIDs($addresses, 'draft');
-                     if ($res != false) {
-                         $return = Routing::route_drafts($message);
--                        if ($return == true) {
-+                        if ($return === true) {
-                             Support::deleteMessage($info, $mbox, $num);
-                             return;
-                         }
-+                        // TODO: handle errors?
+             }
+@@ -558,10 +606,11 @@
+                 $res = Routing::getMatchingIssueIDs($addresses, 'draft');
+                 if ($res != false) {
+                     $return = Routing::route_drafts($message);
+-                    if ($return == true) {
++                    if ($return === true) {
+                         Support::deleteMessage($info, $mbox, $num);
                          return;
                      }
++                    // TODO: handle errors?
+                     return;
                  }
-Index: templates/notifications/bounced_email.tpl.text
-===================================================================
+             }
 --- templates/notifications/bounced_email.tpl.text     (revision 0)
 +++ templates/notifications/bounced_email.tpl.text     (revision 0)
 @@ -0,0 +1,12 @@
This page took 0.081921 seconds and 4 git commands to generate.