Back again... should have looked at my exchange window first... *grumbles*
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 15 Jun 2003 06:57:24 +0000 (06:57 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 15 Jun 2003 06:57:24 +0000 (06:57 +0000)
UW is a royal pain :P

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

functions/imap_mailbox.php

index 7debb01..8af56a9 100755 (executable)
@@ -722,7 +722,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[\"]?.*$/",$lsub_ary[$i])) {
+            if (preg_match("/^\*\s+LSUB\s+\((.*)\)\s+\"(.{1})\"\s+\"INBOX\".*$/",$lsub_ary[$i])) {
                 $has_inbox = true;
                 break;
             }
@@ -731,7 +731,7 @@ function sqimap_mailbox_tree($imap_stream) {
         if ($has_inbox == false) {
             $lsub_ibx = sqimap_run_command( $imap_stream, "LSUB \"\" \"INBOX\"", true, $response, $message );
             if (isset($lsub_ibx[0])) {
-                if (preg_match("/^\*\s+LSUB\s+(.*)[\"]?INBOX[\"]?.*$/",$lsub_ibx[0])) {
+                if (preg_match("/^\*\s+LSUB\s+\((.*)\)\s+\"(.{1})\"\s+\"INBOX\".*$/",$lsub_ibx[0])) {
                     $lsub_ary[] = $lsub_ibx[0];
                 }
             }