summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-05-01 16:15:04 +0000
committersvncommit <devs@roundcube.net>2006-05-01 16:15:04 +0000
commit8fae1e6f850b3affce64231a72de18d637500f73 (patch)
treeea1d3161192d44c3c56f65219d9f3e05fd5c4c83 /program/include
parent3a886697f10edeea1755319e063a8b6c039b9a76 (diff)
Add support for undelete and fix previously undetected bug for marking multiple messages
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index c818fa010..5450f07e7 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -934,18 +934,21 @@ class rcube_imap
// set message flag to one or several messages
- // possible flgs are: SEEN, DELETED, RECENT, ANSWERED, DRAFT
+ // possible flags are: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT
function set_flag($uids, $flag)
{
$flag = strtoupper($flag);
$msg_ids = array();
if (!is_array($uids))
- $uids = array($uids);
+ $uids = explode(',',$uids);
- foreach ($uids as $uid)
+ foreach ($uids as $uid) {
$msg_ids[$uid] = $this->_uid2id($uid);
+ }
- if ($flag=='UNSEEN')
+ if ($flag=='UNDELETED')
+ $result = iil_C_Undelete($this->conn, $this->mailbox, join(',', array_values($msg_ids)));
+ else if ($flag=='UNSEEN')
$result = iil_C_Unseen($this->conn, $this->mailbox, join(',', array_values($msg_ids)));
else
$result = iil_C_Flag($this->conn, $this->mailbox, join(',', array_values($msg_ids)), $flag);