Fix so compacting of non-empty folder is possible also when messages list is empty (#1488858)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix so compacting of non-empty folder is possible also when messages list is empty (#1488858) |
| | | - Allow forwarding of multiple emails (#1486854) |
| | | - Fix big memory consumption of DB layer (#1488856) |
| | | - Add workaround for IE<=8 bug where Content-Disposition:inline was ignored (#1488844) |
| | |
| | | break; |
| | | |
| | | case 'expunge': |
| | | if (this.env.messagecount) |
| | | if (this.env.exists) |
| | | this.expunge_mailbox(this.env.mailbox); |
| | | break; |
| | | |
| | | case 'purge': |
| | | case 'empty-mailbox': |
| | | if (this.env.messagecount) |
| | | if (this.env.exists) |
| | | this.purge_mailbox(this.env.mailbox); |
| | | break; |
| | | |
| | |
| | | // test if purge command is allowed |
| | | this.purge_mailbox_test = function() |
| | | { |
| | | return (this.env.messagecount && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox |
| | | return (this.env.exists && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox |
| | | || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) |
| | | || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter)))); |
| | | }; |
| | |
| | | case 'purge': |
| | | case 'expunge': |
| | | if (this.task == 'mail') { |
| | | if (!this.env.messagecount) { |
| | | if (!this.env.exists) { |
| | | // clear preview pane content |
| | | if (this.env.contentframe) |
| | | this.show_contentframe(false); |
| | |
| | | this.env.qsearch = null; |
| | | case 'list': |
| | | if (this.task == 'mail') { |
| | | this.enable_command('show', 'expunge', 'select-all', 'select-none', (this.env.messagecount > 0)); |
| | | this.enable_command('show', 'select-all', 'select-none', this.env.messagecount > 0); |
| | | this.enable_command('expunge', this.env.exists); |
| | | this.enable_command('purge', this.purge_mailbox_test()); |
| | | this.enable_command('expand-all', 'expand-unread', 'collapse-all', this.env.threading && this.env.messagecount); |
| | | |
| | |
| | | if (!empty($_GET['_quota'])) |
| | | $OUTPUT->command('set_quota', rcmail_quota_content()); |
| | | |
| | | $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); |
| | | |
| | | // "No-list" mode, don't get messages |
| | | if (empty($_GET['_list'])) |
| | | continue; |
| | | |
| | | // get overall message count; allow caching because rcube_storage::folder_status() did a refresh |
| | | $list_mode = $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL'; |
| | | $all_count = $RCMAIL->storage->count(null, $list_mode, false, false); |
| | | $all_count = $RCMAIL->storage->count($mbox_name, $list_mode, false, false); |
| | | $page = $RCMAIL->storage->get_page(); |
| | | $page_size = $RCMAIL->storage->get_pagesize(); |
| | | |
| | |
| | | if (!empty($_REQUEST['_reload'])) { |
| | | $OUTPUT->set_env('messagecount', 0); |
| | | $OUTPUT->set_env('pagecount', 0); |
| | | $OUTPUT->set_env('exists', 0); |
| | | $OUTPUT->command('message_list.clear'); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text(), $mbox); |
| | | $OUTPUT->command('set_unread_count', $mbox, 0); |
| | |
| | | $OUTPUT->set_env('pagecount', $pages); |
| | | $OUTPUT->set_env('threading', $threading); |
| | | $OUTPUT->set_env('current_page', $count ? $RCMAIL->storage->get_page() : 1); |
| | | $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name); |
| | | $OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text()); |
| | | |
| | |
| | | |
| | | 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(); |
| | |
| | | $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(); |
| | |
| | | |
| | | // send response |
| | | $OUTPUT->send(); |
| | | |
| | | |
| | |
| | | $OUTPUT->set_env('search_request', $search_str ? $search_request : ''); |
| | | $OUTPUT->set_env('messagecount', $count); |
| | | $OUTPUT->set_env('pagecount', ceil($count/$RCMAIL->storage->get_pagesize())); |
| | | $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); |
| | | $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox); |
| | | $OUTPUT->send(); |