]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/mail/folders.inc
Imported Upstream version 0.3.1
[roundcube.git] / program / steps / mail / folders.inc
index 88e48b2116f6376fb2d93b658934cdb0920bf034..4e731d0b1145fbb9d06c1e223cc77dd653387997 100644 (file)
@@ -5,7 +5,7 @@
  | program/steps/mail/folders.inc                                        |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id: folders.inc 1570 2008-06-24 13:04:57Z alec $
+ $Id: folders.inc 2959 2009-09-17 12:07:58Z alec $
 */
 
+// only process ajax requests
+if (!$OUTPUT->ajax_call)
+  return;
+
 $mbox_name = $IMAP->get_mailbox_name();
 
 // send EXPUNGE command
@@ -56,6 +60,7 @@ else if ($RCMAIL->action=='purge' && ($mbox = get_input_value('_mbox', RCUBE_INP
       $OUTPUT->command('message_list.clear');
       $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
       $OUTPUT->command('set_unread_count', $mbox_name, 0);
+      $_SESSION['unseen_count'][$mbox_name] = 0;
     }
     else
       $commands = "// purged: $success";
@@ -63,4 +68,5 @@ else if ($RCMAIL->action=='purge' && ($mbox = get_input_value('_mbox', RCUBE_INP
 }
 
 $OUTPUT->send($commands);
+
 ?>