summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-05-01 16:23:03 +0000
committersvncommit <devs@roundcube.net>2006-05-01 16:23:03 +0000
commit4cd8976dc7d8dc4d9372f9cd79650d912857e0c2 (patch)
tree69370d71b431e315202a8b72fc8ec7649cc503c5 /program/steps/mail
parent6ec0a8518be4aa8ea9e522bbc30fe6bacb1b9013 (diff)
Added support for undelete
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/mark.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index be9814ecb..c12429d4a 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -21,15 +21,16 @@
$REMOTE_REQUEST = TRUE;
-$a_flags_map = array('read' => 'SEEN',
+$a_flags_map = array('undelete' => 'UNDELETED',
+ 'delete' => 'DELETED',
+ 'read' => 'SEEN',
'unread' => 'UNSEEN');
if ($_GET['_uid'] && $_GET['_flag'])
{
$flag = $a_flags_map[$_GET['_flag']] ? $a_flags_map[$_GET['_flag']] : strtoupper($_GET['_flag']);
$marked = $IMAP->set_flag($_GET['_uid'], $flag);
-
- if ($marked)
+ if ($marked != -1)
{
$mbox = $IMAP->get_mailbox_name();
$commands = sprintf("this.set_unread_count('%s', %d);\n", $mbox, $IMAP->messagecount($mbox, 'UNSEEN'));