Remove leading spaces from IMAP commands, which was breaking Cyrus. This
authorbrong <brong@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Jan 2002 10:55:30 +0000 (10:55 +0000)
committerbrong <brong@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Jan 2002 10:55:30 +0000 (10:55 +0000)
is brittle behaviour from Cyrus, but covered by the spec, which does indeed
require once single 0x20 only.  My bad, or something.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2134 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php
functions/imap_mailbox.php

index a2e6bac355d36b2816f8ac11d099dc7a05364ac2..21672e144ddc8048bb05bd6bba731711f021f7d7 100755 (executable)
@@ -387,7 +387,7 @@ function sqimap_find_displayable_name ($string) {
 */
 function sqimap_unseen_messages ($imap_stream, $mailbox) {
     //fputs ($imap_stream, sqimap_session_id() . " SEARCH UNSEEN NOT DELETED\r\n");
-    $read_ary = sqimap_run_command ($imap_stream, " STATUS \"$mailbox\" (UNSEEN)", true, $result, $message);
+    $read_ary = sqimap_run_command ($imap_stream, "STATUS \"$mailbox\" (UNSEEN)", true, $result, $message);
     ereg("UNSEEN ([0-9]+)", $read_ary[0], $regs);
     return $regs[1];
 }
index 39fc5a37b32b6bd117bfa7c204726523d38e3069..3b0dfdd119361b6369244a2facac0bbb15f1c13e 100755 (executable)
@@ -81,7 +81,7 @@ function sqimap_mailbox_select ($imap_stream, $mailbox,
         return $r[1];
     }
     if ($auto_expunge) {
-        $tmp = sqimap_run_command($imap_stream, "EXPUNGE",
+        $tmp = sqimap_run_command($imap_stream, 'EXPUNGE',
                                   false, $a, $b);
     }
 }
@@ -110,7 +110,7 @@ function sqimap_mailbox_create ($imap_stream, $mailbox, $type)
  ******************************************************************************/
 function sqimap_subscribe ($imap_stream, $mailbox)
 {
-    $read_ary = sqimap_run_command($imap_stream, " SUBSCRIBE \"$mailbox\"",
+    $read_ary = sqimap_run_command($imap_stream, "SUBSCRIBE \"$mailbox\"",
                                  TRUE, $response, $message);
 }
 
@@ -123,7 +123,7 @@ function sqimap_unsubscribe ($imap_stream, $mailbox)
 {
     global $imap_server_type;
     
-    $read_ary = sqimap_run_command($imap_stream, " UNSUBSCRIBE \"$mailbox\"",
+    $read_ary = sqimap_run_command($imap_stream, "UNSUBSCRIBE \"$mailbox\"",
                                  TRUE, $response, $message);
 }