| | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | | // only process ajax requests |
| | |
| | | |
| | | if (!$moved) { |
| | | // send error message |
| | | if ($_POST['_from'] != 'show') |
| | | if ($_POST['_from'] != 'show') |
| | | $OUTPUT->command('list_mailbox'); |
| | | rcmail_display_server_error('errormoving'); |
| | | $OUTPUT->send(); |
| | |
| | | |
| | | if (!$del) { |
| | | // send error message |
| | | if ($_POST['_from'] != 'show') |
| | | if ($_POST['_from'] != 'show') |
| | | $OUTPUT->command('list_mailbox'); |
| | | rcmail_display_server_error('errordeleting'); |
| | | $OUTPUT->send(); |
| | |
| | | } |
| | | // unknown action or missing query param |
| | | else { |
| | | $OUTPUT->show_message('internalerror', 'error'); |
| | | $OUTPUT->send(); |
| | | exit; |
| | | } |
| | | |
| | |
| | | $OUTPUT->set_env('messagecount', $msg_count); |
| | | $OUTPUT->set_env('current_page', $page); |
| | | $OUTPUT->set_env('pagecount', $pages); |
| | | $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox, 'EXISTS', true)); |
| | | |
| | | // update mailboxlist |
| | | $mbox = $RCMAIL->storage->get_folder(); |
| | |
| | | |
| | | // add new rows from next page (if any) |
| | | if ($addrows && $count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { |
| | | $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 = $RCMAIL->storage->list_messages($mbox, NULL, $sort_col, $sort_order, |
| | | $jump_back ? NULL : $count); |
| | | $a_headers = $RCMAIL->storage->list_messages($mbox, NULL, |
| | | rcmail_sort_column(), rcmail_sort_order(), $jump_back ? NULL : $count); |
| | | |
| | | rcmail_js_message_list($a_headers, false); |
| | | } |
| | |
| | | |
| | | // send response |
| | | $OUTPUT->send(); |
| | | |
| | | |