summaryrefslogtreecommitdiff
path: root/program/steps/mail/move_del.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-04 14:39:47 +0000
committeralecpl <alec@alec.pl>2010-03-04 14:39:47 +0000
commita039c626eef6ad0e6c915d1618fbd0e6e40f57a2 (patch)
tree59d6ce47deb52121b9793d9521a6636204323185 /program/steps/mail/move_del.inc
parentbbc8565e5afa7e5352bc3aaf7cf067066ec6d4b1 (diff)
- Fix deleting all messages from last list page (#1486293)
Diffstat (limited to 'program/steps/mail/move_del.inc')
-rw-r--r--program/steps/mail/move_del.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index 2895867e3..b8bd16557 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -88,7 +88,7 @@ else
$remaining = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1);
// jump back one page (user removed the whole last page)
- if ($IMAP->list_page > 1 && $nextpage_count <= 0 && $remaining == 0) {
+ if ($IMAP->list_page > 1 && $remaining == 0) {
$IMAP->set_page($IMAP->list_page-1);
$_SESSION['page'] = $IMAP->list_page;
$jump_back = true;
@@ -121,7 +121,8 @@ else
$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, $count);
+ $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order,
+ $jump_back ? NULL : $count);
rcmail_js_message_list($a_headers, false, false);
}