diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-26 08:50:10 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-26 08:50:10 +0000 |
| commit | 031c08be6f8052a14bbe0b0b02410d15373995e1 (patch) | |
| tree | cdd612146be5ee91856e835b15fac28c81c8bbbf /roundcubemail/program/lib/imap.inc | |
| parent | e3263dbb9753760de580cf69edb0478915425314 (diff) | |
- Support UID EXPUNGE: remove only moved/deleted messages
git-svn-id: https://svn.roundcube.net/trunk@2540 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/imap.inc')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index 1b8bec0fb..b5412e39d 100644 --- a/roundcubemail/program/lib/imap.inc +++ b/roundcubemail/program/lib/imap.inc @@ -82,6 +82,7 @@ - use PREG instead of EREG - removed caching functions - handling connection startup response + - added UID EXPUNGE support ********************************************************/ @@ -1863,11 +1864,13 @@ function iil_SortHeaders($a, $field, $flag) { return $result; } -function iil_C_Expunge(&$conn, $mailbox) { +function iil_C_Expunge(&$conn, $mailbox, $messages=NULL) { if (iil_C_Select($conn, $mailbox)) { $c = 0; - iil_PutLine($conn->fp, "exp1 EXPUNGE"); + $command = $messages ? "UID EXPUNGE $messages" : "EXPUNGE"; + + iil_PutLine($conn->fp, "exp1 $command"); do { $line=chop(iil_ReadLine($conn->fp, 100)); if ($line[0] == '*') { @@ -2030,12 +2033,13 @@ function iil_C_Search(&$conn, $folder, $criteria) { } function iil_C_Move(&$conn, $messages, $from, $to) { - $fp = $conn->fp; if (!$from || !$to) { return -1; } - $r = iil_C_Copy($conn, $messages, $from,$to); + + $r = iil_C_Copy($conn, $messages, $from, $to); + if ($r==0) { return iil_C_Delete($conn, $from, $messages); } |
