Changeset c3ab87b6 in github
- Timestamp:
- Oct 2, 2007 4:25:48 AM (6 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 9a3567a
- Parents:
- 51e14a1
- File:
-
- 1 edited
-
program/steps/mail/move_del.inc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/steps/mail/move_del.inc
r51e14a1 rc3ab87b6 20 20 */ 21 21 22 // count pages before changing anything22 // count messages before changing anything 23 23 $old_count = $IMAP->messagecount(); 24 $old_pages = ceil($old_count / $IMAP->page_size);25 24 26 25 // move messages … … 66 65 67 66 67 $remaining = $old_count - $IMAP->page_size * $IMAP->list_page; 68 69 // jump back one page (user removed the whole last page) 70 if ($IMAP->list_page > 1 && $remaining <= 0) 71 { 72 $IMAP->set_page($IMAP->list_page-1); 73 $_SESSION['page'] = $IMAP->list_page; 74 $jump_back = true; 75 } 76 68 77 // update message count display 69 78 $msg_count = $IMAP->messagecount(); 70 79 $pages = ceil($msg_count / $IMAP->page_size); 71 80 $OUTPUT->set_env('pagecount', $pages); 81 $OUTPUT->set_env('current_page', $IMAP->list_page); 72 82 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 73 83 … … 83 93 84 94 // add new rows from next page (if any) 85 if ($_POST['_from']!='show' && $old_pages>1 && $IMAP->list_page < $old_pages)95 if ($_POST['_from']!='show' && ($jump_back || $remaining > 0)) 86 96 { 87 97 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; … … 89 99 90 100 $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order); 91 $a_headers = array_slice($a_headers, -$count, $count); 101 if (!$jump_back) 102 $a_headers = array_slice($a_headers, -$count, $count); 92 103 93 104 rcmail_js_message_list($a_headers);
Note: See TracChangeset
for help on using the changeset viewer.
