diff options
author | alecpl <alec@alec.pl> | 2008-10-09 09:48:10 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-10-09 09:48:10 +0000 |
commit | 7ae46f2b1dd87a0bdc046e1a0d12fbf3ca141c14 (patch) | |
tree | 5e26cd80bf49e0cd1fb6281875eed414111d8dbc /program/lib | |
parent | e3b7a3789035a5c95dcae8d82b0978b64473c5f3 (diff) |
- fixed iil_C_Sort() to support very long and/or divided responses (#1485283)
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/imap.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc index 98173687b..c78e67ad5 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -67,6 +67,7 @@ - remove 'undisclosed-recipients' string from 'To' header - iil_C_HandlePartBody(): added 6th argument and fixed endless loop - added iil_PutLineC() + - fixed iil_C_Sort() to support very long and/or divided responses ********************************************************/ @@ -912,8 +913,10 @@ function iil_C_Sort(&$conn, $mailbox, $field, $add='', $is_uid=FALSE, do { $line = chop(iil_ReadLine($fp, 1024)); if (iil_StartsWith($line, '* SORT')) { - $data .= ($data?' ':'') . substr($line, 7); - } + $data .= ($data ? ' ' : '') . substr($line, 7); + } else if (preg_match('/^[0-9 ]+$/', $line)) { + $data .= $line; + } } while ($line[0]!='s'); if (empty($data)) { |