summaryrefslogtreecommitdiff
path: root/program/lib/imap.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-02 19:19:39 +0000
committeralecpl <alec@alec.pl>2009-05-02 19:19:39 +0000
commitaeed58d5af0d56ec489d15cdbdffa3f95b353a90 (patch)
tree4de2f68342614ff81099bd40a09839a6faf88c13 /program/lib/imap.inc
parent3ddbe667a9e7a7d644588ce8c4f650fae9485cc1 (diff)
- Use UID STORE/COPY commands
Diffstat (limited to 'program/lib/imap.inc')
-rw-r--r--program/lib/imap.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 967b3f160..773a0fbe3 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -2080,7 +2080,7 @@ function iil_C_ModFlag(&$conn, $mailbox, $messages, $flag, $mod) {
if (iil_C_Select($conn, $mailbox)) {
$c = 0;
- iil_PutLine($fp, "flg STORE $messages " . $mod . "FLAGS (" . $flag . ")");
+ iil_PutLine($fp, "flg UID STORE $messages " . $mod . "FLAGS (" . $flag . ")");
do {
$line=chop(iil_ReadLine($fp, 100));
if ($line[0] == '*') {
@@ -2129,7 +2129,7 @@ function iil_C_Copy(&$conn, $messages, $from, $to) {
if (iil_C_Select($conn, $from)) {
$c=0;
- iil_PutLine($fp, "cpy1 COPY $messages \"".iil_Escape($to)."\"");
+ iil_PutLine($fp, "cpy1 UID COPY $messages \"".iil_Escape($to)."\"");
$line=iil_ReadReply($fp);
return iil_ParseResult($line);
} else {
@@ -2843,7 +2843,7 @@ function iil_C_GetQuota(&$conn) {
function iil_C_ClearFolder(&$conn, $folder) {
$num_in_trash = iil_C_CountMessages($conn, $folder);
if ($num_in_trash > 0) {
- iil_C_Delete($conn, $folder, '1:' . $num_in_trash);
+ iil_C_Delete($conn, $folder, '1:*');
}
return (iil_C_Expunge($conn, $folder) >= 0);
}