diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-14 11:18:00 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-14 11:18:00 +0000 |
| commit | 81696db275ab1d654abb7e6042d3d9805fa8cb7b (patch) | |
| tree | 3c033994bb33392af4e492b9aa5936a2b4167a86 /roundcubemail/program/lib/imap.inc | |
| parent | 106f48cfbd0e3d8d635da3ca3ff92c2ea11466b5 (diff) | |
- fixes for status filter
- don't call search second time if first call returns empty (array) result
git-svn-id: https://svn.roundcube.net/trunk@2052 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/imap.inc')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index 8cbb0e02b..8704e78f5 100644 --- a/roundcubemail/program/lib/imap.inc +++ b/roundcubemail/program/lib/imap.inc @@ -941,9 +941,11 @@ function iil_C_Sort(&$conn, $mailbox, $field, $add='', $is_uid=FALSE, } } while (!iil_StartsWith($line, 's ', true)); - if (empty($data)) { - $conn->error = $line; - return false; + $result_code = iil_ParseResult($line); + + if ($result_code != 0) { + $conn->error = 'iil_C_Sort: ' . $line . "\n"; + return false; } $out = explode(' ',$data); @@ -2116,7 +2118,7 @@ function iil_C_Search(&$conn, $folder, $criteria) { $messages = explode(' ', $str); } } while (!iil_StartsWith($line, 'srch1', true)); - + $result_code = iil_ParseResult($line); if ($result_code == 0) { return $messages; |
