Browse Source

Back again... should have looked at my exchange window first... *grumbles*
UW is a royal pain :P

jangliss 22 years ago
parent
commit
55ecf21b0c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      functions/imap_mailbox.php

+ 2 - 2
functions/imap_mailbox.php

@@ -722,7 +722,7 @@ function sqimap_mailbox_tree($imap_stream) {
         $has_inbox = false;
         $has_inbox = false;
 
 
         for ($i = 0, $cnt = count($lsub_ary); $i < $cnt; $i++) {
         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;
                 $has_inbox = true;
                 break;
                 break;
             }
             }
@@ -731,7 +731,7 @@ function sqimap_mailbox_tree($imap_stream) {
         if ($has_inbox == false) {
         if ($has_inbox == false) {
             $lsub_ibx = sqimap_run_command( $imap_stream, "LSUB \"\" \"INBOX\"", true, $response, $message );
             $lsub_ibx = sqimap_run_command( $imap_stream, "LSUB \"\" \"INBOX\"", true, $response, $message );
             if (isset($lsub_ibx[0])) {
             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];
                     $lsub_ary[] = $lsub_ibx[0];
                 }
                 }
             }
             }