Require whitespace in the LSUB before the mailbox name to prevent a
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Feb 2004 14:25:49 +0000 (14:25 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Feb 2004 14:25:49 +0000 (14:25 +0000)
subfolder called "foo.bar.inbox" to be treated as INBOX.

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

functions/imap_mailbox.php

index 865d9f36e1b2379ce1c0dcc9df5f39cffa5bbbb9..8d5b957e52c2da4dcd9e371dbe7ab92e642514d0 100755 (executable)
@@ -812,7 +812,7 @@ function sqimap_mailbox_tree($imap_stream) {
         $has_inbox = false;
 
         for ($i = 0, $cnt = count($lsub_ary); $i < $cnt; $i++) {
-            if (preg_match("/^\*\s+LSUB\s+(.*)\"?INBOX\"?[^(\/\.)].*$/i",$lsub_ary[$i])) {
+            if (preg_match("/^\*\s+LSUB\s+(.*)\s\"?INBOX\"?[^(\/\.)].*$/i",$lsub_ary[$i])) {
                $lsub_ary[$i] = strtoupper($lsub_ary[$i]);
                 $has_inbox = true;
                 break;