summaryrefslogtreecommitdiff
path: root/roundcubemail/program/lib
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-11-25 16:23:10 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-11-25 16:23:10 +0000
commit856aecad34b025ec0912e32139128f9a6cdb95da (patch)
tree0359186b777c995d22ea32fb35672996b23ae7e4 /roundcubemail/program/lib
parent6ac3c9018c1c453a62dcb37a09efa7e85d6450b6 (diff)
Applied UID fetch patch by Glen Ogilvie
git-svn-id: https://svn.roundcube.net/trunk@926 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
-rw-r--r--roundcubemail/program/lib/imap.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc
index 264c3af50..ed2111c57 100644
--- a/roundcubemail/program/lib/imap.inc
+++ b/roundcubemail/program/lib/imap.inc
@@ -1266,7 +1266,18 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false){
$i++;
$lines[$i] = trim(chop($line));
}
- }while($line[0]!=")" && strncmp($line, $key, strlen($key))); // patch from "Maksim Rubis" <siburny@hotmail.com>
+ /*
+ The preg_match below works around communigate imap, which outputs " UID <number>)".
+ Without this, the while statement continues on and gets the "fh0 OK completed" message.
+ If this loop gets the ending message, then the outer loop does not receive it from radline on line 1249.
+ This in causes the if statement on line 1278 to never be true, which causes the headers to end up missing
+ If the if statement was changed to pick up the fh0 from this loop, then it causes the outer loop to spin
+ An alternative might be:
+ if (!preg_match("/:/",$line) && preg_match("/\)$/",$line)) break;
+ however, unsure how well this would work with all imap clients.
+ */
+ if (preg_match("/^\s*UID [0-9]+\)$/",$line)) break;
+ }while(trim($line[0])!=")" && strncmp($line, $key, strlen($key))); // patch from "Maksim Rubis" <siburny@hotmail.com>
if(strncmp($line, $key, strlen($key)))
{