don't include delimiter in subscription command, when noselect mailbox is created
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Mar 2006 21:15:00 +0000 (21:15 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Mar 2006 21:15:00 +0000 (21:15 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10845 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 684b34b0fdd18987982b714528b62c584600fd7c..41d8fd53240e35dc1be8827c7a8296718ca1d36a 100755 (executable)
@@ -401,11 +401,13 @@ function sqimap_mailbox_select ($imap_stream, $mailbox) {
 function sqimap_mailbox_create ($imap_stream, $mailbox, $type) {
     global $delimiter;
     if (strtolower($type) == 'noselect') {
-        $mailbox .= $delimiter;
+        $create_mailbox = $mailbox . $delimiter;
+    } else {
+        $create_mailbox = $mailbox;
     }
 
     $read_ary = sqimap_run_command($imap_stream, 'CREATE ' .
-                                   sqimap_encode_mailbox_name($mailbox),
+                                   sqimap_encode_mailbox_name($create_mailbox),
                                    true, $response, $message);
     sqimap_subscribe ($imap_stream, $mailbox);
 }