From 3ea0e3202a73eb7efcbf0b825582a6d3504658aa Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 01 Sep 2006 09:43:14 -0400
Subject: [PATCH] Quota display as image

---
 program/steps/mail/mark.inc |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index 2dadb53..e6e06f9 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -1,12 +1,11 @@
 <?php
-
 /*
  +-----------------------------------------------------------------------+
  | program/steps/mail/mark.inc                                           |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
  | Copyright (C) 2005, RoundCube Dev. - Switzerland                      |
- | All rights reserved.                                                  |
+ | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
  |   Mark the submitted messages with the specified flag                 |
@@ -21,18 +20,19 @@
 
 $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'));
+    $mbox_name = $IMAP->get_mailbox_name();
+    $commands = sprintf("this.set_unread_count('%s', %d);\n", $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'));
     rcube_remote_response($commands);
     }
   }

--
Gitblit v1.9.1