| | |
| | | |
| | | */ |
| | | |
| | | $OUTPUT_TYPE = 'js'; |
| | | // is there a sort type for this request? |
| | | if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) |
| | | { |
| | |
| | | list($sort_col, $sort_order) = explode('_', $sort); |
| | | |
| | | // set session vars for sort (so next page and task switch know how to sort) |
| | | $_SESSION['sort_col'] = $sort_col; |
| | | $_SESSION['sort_order'] = $sort_order; |
| | | $save_arr = array(); |
| | | $_SESSION['sort_col'] = $save_arr['message_sort_col'] = $sort_col; |
| | | $_SESSION['sort_order'] = $save_arr['message_sort_order'] = $sort_order; |
| | | |
| | | $RCMAIL->user->save_prefs($save_arr); |
| | | } |
| | | else |
| | | { |
| | |
| | | $OUTPUT->set_env('messagecount', $count); |
| | | $OUTPUT->set_env('pagecount', $pages); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count)); |
| | | $OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text()); |
| | | |
| | | // update mailboxlist |
| | | $OUTPUT->command('set_unread_count', $mbox_name, $unseen); |
| | | |
| | | |
| | | // add message rows |
| | |
| | | else |
| | | $OUTPUT->show_message('nomessagesfound', 'notice'); |
| | | |
| | | // update mailboxlist |
| | | $OUTPUT->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); |
| | | |
| | | // send response |
| | | $OUTPUT->send(); |
| | | |