From 1a16af11da4635f66ff10304d9b86ab3747f2900 Mon Sep 17 00:00:00 2001 From: brong Date: Tue, 15 Jan 2002 10:55:30 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2134 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 2 +- functions/imap_mailbox.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index a2e6bac3..21672e14 100755 --- a/functions/imap_general.php +++ b/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]; } diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 39fc5a37..3b0dfdd1 100755 --- a/functions/imap_mailbox.php +++ b/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); } -- 2.25.1