Explorar el Código

Remove leading spaces from IMAP commands, which was breaking Cyrus. This
is brittle behaviour from Cyrus, but covered by the spec, which does indeed
require once single 0x20 only. My bad, or something.

Bron Gondwana hace 23 años
padre
commit
7aff136d92
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 1 1
      functions/imap_general.php
  2. 3 3
      functions/imap_mailbox.php

+ 1 - 1
functions/imap_general.php

@@ -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];
 }

+ 3 - 3
functions/imap_mailbox.php

@@ -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);
 }