diff options
author | thomascube <thomas@roundcube.net> | 2006-12-20 14:27:47 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2006-12-20 14:27:47 +0000 |
commit | 04c61804f81a3ed839ef35e7fa70185f713498fd (patch) | |
tree | 9e323c0acddce59a3daaaa9ae86066384dff64be /program/steps/mail/move_del.inc | |
parent | f91a4990461d44f12755628f732b3b25544b96cc (diff) |
Fixed wrong message listing when showing search results
Diffstat (limited to 'program/steps/mail/move_del.inc')
-rw-r--r-- | program/steps/mail/move_del.inc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index a7aa5c782..b0079f75f 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -59,10 +59,15 @@ else exit; } +// refresh saved seach set after moving some messages +if (($search_request = $_GET['_search']) && $IMAP->search_set) + $_SESSION['search'][$search_request] = $IMAP->refresh_search(); + // update message count display -$pages = ceil($IMAP->messagecount()/$IMAP->page_size); -$commands = sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text()); +$msg_count = $IMAP->messagecount(); +$pages = ceil($msg_count / $IMAP->page_size); +$commands = sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text($msg_count)); $commands .= sprintf("this.set_env('pagecount', %d);\n", $pages); @@ -78,12 +83,16 @@ $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota()); // add new rows from next page (if any) if ($_GET['_from']!='show' && $pages>1 && $IMAP->list_page < $pages) { - $a_headers = $IMAP->list_headers($mbox, null, $_SESSION['sort_col'], $_SESSION['sort_order']); + $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; + $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; + + $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order); $a_headers = array_slice($a_headers, -$count, $count); + $commands .= rcmail_js_message_list($a_headers); } - + // send response rcube_remote_response($commands); |