Make sure mailboxnames like INBOX_Blah doesn't match on our INBOX detection
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 20 Jul 2005 19:30:53 +0000 (19:30 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 20 Jul 2005 19:30:53 +0000 (19:30 +0000)
regular expression.

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

functions/imap_mailbox.php

index 4cf256cc37543542d57b6bc0c3847afd2f71b0df..827a83dc1b723bcd58d3040fa9ac87dab452c800 100755 (executable)
@@ -924,7 +924,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_cmd.*\s\"?INBOX\"?[^(\/\.)].*$/i",$lsub_ary[$i])) {
+        if (preg_match("/^\*\s+$lsub_cmd.*\s\"?INBOX\"?\s*$/i",$lsub_ary[$i])) {
             $lsub_ary[$i] = strtoupper($lsub_ary[$i]);
             // in case of an unsubscribed inbox an imap server can
             // return the inbox in the lsub results with a \NoSelect