Still some typos in mailbox.php (filters code)

Remi Cohen-Scali Remi.Cohen-Scali@france.sun.com
Tue, 18 Dec 2001 16:15:28 +0100


---------------------- multipart/mixed attachment
the patch file will be easier to use

-- 
   _/_/_/   _/    _/  _/      /      Remi Cohen-Scali
   _/      _/    _/  _/_/   _/       Development engineer
  _/_/_/  _/    _/  _/  _/ _/        Network Service Provider Division
     _/  _/    _/  _/   _/_/         Phone:     +33-139-447-509  x44509
_/_/_/   _/_/_/   _/     _/          E-mails: Remi.Cohen-Scali@Sun.COM
M  I  C  R  O  S  Y  S  T  E  M  S            Remi@Cohen-Scali.COM
                                     WAPmail: Remi.CohenScali@Itineris.Net



---------------------- multipart/mixed attachment
diff -urNwbB imp/lib/Message.php imp/lib/Message.php
--- imp/lib/Message.php	Tue Dec 18 15:20:28 2001
+++ imp/lib/Message.php	Tue Dec 18 15:26:18 2001
@@ -118,7 +118,7 @@
             }
         }
         else {
-            $msg_list = implode($msgs, ',');
+            $msg_list = implode(',', $msgs);
             if (!imap_mail_copy($imp['stream'], $msg_list, $targetMbox, $imap_flags)) {
                 Horde::raiseMessage(sprintf($message, IMP::displayFolder($targetFolder)) . 
                                     ': <i>' . imap_last_error() . '</i>', HORDE_ERROR);
@@ -332,7 +332,7 @@
                 }
             }
         } else {
-            $msg_list = implode($indices, ',');
+            $msg_list = implode(',', $indices);
             if (!$function($imp['stream'], $msg_list, $flag, ST_UID)) {
                 Horde::raiseMessage(sprintf(_("There was an error flagging messages. This is what the server said")) .
                                     ': <i>' . imap_last_error() . '</i>', HORDE_ERROR);
diff -urNwbB imp/mailbox.php imp/mailbox.php
--- imp/mailbox.php	Tue Dec 18 13:34:45 2001
+++ imp/mailbox.php	Sat Dec 15 12:56:48 2001
@@ -340,7 +340,7 @@
                  if (isset($indices) && is_array($indices)) {
                      if ($filters[$i]['action'] == 'delete') {
                          if ($prefs->getValue('show_filter_msg')) {
-                             $overview = imap_fetch_overview($imp['stream'], implode($indices, ','), FT_UID);
+                             $overview = imap_fetch_overview($imp['stream'], implode(',', $indices), FT_UID);
                              foreach ($overview as $message) {
                                  if ($prefs->getValue('use_trash')) {
                                      Horde::raiseMessage(_(sprintf("Filter Activity: The message \"%s\" from \"%s\" has been moved to your Trash folder.", MIME::decode($message->subject), MIME::decode($message->from))), HORDE_MESSAGE);
@@ -355,7 +355,7 @@
                      else {
                          if (IMP_Folder::exists($imp['stream'], $filters[$i]['folder'])) {
                              if ($prefs->getValue('show_filter_msg')) {
-                                 $overview = imap_fetch_overview($imp['stream'], implode($indices, ','), FT_UID);
+                                 $overview = imap_fetch_overview($imp['stream'], implode(',', $indices), FT_UID);
                                  foreach ($overview as $message) {
                                      Horde::raiseMessage(_(sprintf("Filter Activity: The message \"%s\" from \"%s\" has been moved to the folder \"%s\".", MIME::decode($message->subject), $message->from, $filters[$i]['folder'])), HORDE_MESSAGE);
                                  }
@@ -572,7 +572,7 @@
         if ($imp['mailbox'] === '**search') {
             if (($j === $beginIndex) || ($folders[$j - 1] !== $folders[$j])) {
                 if (count($msgs) > 0) {
-                    $overview = imap_fetch_overview($imp['stream'], implode($msgs, ','), FT_UID);
+                    $overview = imap_fetch_overview($imp['stream'], implode(',', $msgs), FT_UID);
                     $msgs = array();
                     foreach ($overview as $header) {
                         $mailboxOverview[$sortedIds[$header->uid]]['header'] = $header;
@@ -599,7 +599,7 @@
     }
 }
 if (count($msgs) > 0) {
-    $overview = imap_fetch_overview($imp['stream'], implode($msgs, ','), FT_UID);
+    $overview = imap_fetch_overview($imp['stream'], implode(',', $msgs), FT_UID);
     foreach ($overview as $header) {
         $mailboxOverview[$sortedIds[$header->uid]]['header'] = $header;
         $mailboxOverview[$sortedIds[$header->uid]]['arrayIndex'] = $extra[$header->uid]['arrayIndex'];

---------------------- multipart/mixed attachment--