From 7a723522945b8954681171aa012b7ee1431a45cd Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 23 Apr 2009 02:15:21 -0400
Subject: [PATCH] - messages list fix for IE

---
 program/steps/mail/move_del.inc |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index c8db35b..399d41f 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -28,6 +28,11 @@
     $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
     $target = get_input_value('_target_mbox', RCUBE_INPUT_POST);
     $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+
+    // flag messages as read before moving them
+    if ($CONFIG['read_when_deleted'] && $target == $CONFIG['trash_mbox'])
+	$IMAP->set_flag($uids, 'SEEN');
+
     $moved = $IMAP->move_message($uids, $target, $mbox);
   
     if (!$moved) {
@@ -37,10 +42,6 @@
         $OUTPUT->send();
         exit;
     }
-
-    // flag old messages as read because rcube_imap will not send expunge command after moving
-    if ($CONFIG['read_when_deleted'])
-        $IMAP->set_flag($uids, 'SEEN');
 
     if (!$CONFIG['flag_for_deletion'])
         $addrows = true;
@@ -107,7 +108,7 @@
     if (!$jump_back) {
         $a_headers = array_slice($a_headers, -$count, $count);
     }
-    rcmail_js_message_list($a_headers);
+    rcmail_js_message_list($a_headers, false, false);
 }
 
 // send response

--
Gitblit v1.9.1