- Fix bug where after delete message rows can be added to the list of another folder (#1487752)

release-0.7
alecpl 13 years ago
parent 48a06551da
commit bba25299f8

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Fix bug where after delete message rows can be added to the list of another folder (#1487752)
- Add notice on autocompletion that not all records were displayed - Add notice on autocompletion that not all records were displayed
- Add option 'searchonly' for LDAP address books - Add option 'searchonly' for LDAP address books
- Add Priority filter to the messages list - Add Priority filter to the messages list

@ -1641,6 +1641,10 @@ function rcube_webmail()
if (!this.gui_objects.messagelist || !this.message_list) if (!this.gui_objects.messagelist || !this.message_list)
return false; return false;
// Prevent from adding messages from different folder (#1487752)
if (flags.mbox != this.env.mailbox && !flags.skip_mbox_check)
return false;
if (!this.env.messages[uid]) if (!this.env.messages[uid])
this.env.messages[uid] = {}; this.env.messages[uid] = {};
@ -2091,8 +2095,12 @@ function rcube_webmail()
}; };
// Initializes threads indicators/expanders after list update // Initializes threads indicators/expanders after list update
this.init_threads = function(roots) this.init_threads = function(roots, mbox)
{ {
// #1487752
if (mbox && mbox != this.env.mailbox)
return false;
for (var n=0, len=roots.length; n<len; n++) for (var n=0, len=roots.length; n<len; n++)
this.add_tree_icons(roots[n]); this.add_tree_icons(roots[n]);
this.expand_threads(); this.expand_threads();
@ -5463,8 +5471,12 @@ function rcube_webmail()
}; };
// replace content of row count display // replace content of row count display
this.set_rowcount = function(text) this.set_rowcount = function(text, mbox)
{ {
// #1487752
if (mbox && mbox != this.env.mailbox)
return false;
$(this.gui_objects.countdisplay).html(text); $(this.gui_objects.countdisplay).html(text);
// update page navigation buttons // update page navigation buttons

@ -81,7 +81,7 @@ foreach ($a_mailboxes as $mbox_name) {
$OUTPUT->set_env('messagecount', $all_count); $OUTPUT->set_env('messagecount', $all_count);
$OUTPUT->set_env('pagecount', ceil($all_count/$IMAP->page_size)); $OUTPUT->set_env('pagecount', ceil($all_count/$IMAP->page_size));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($all_count)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($all_count), $mbox_name);
$OUTPUT->set_env('current_page', $all_count ? $IMAP->list_page : 1); $OUTPUT->set_env('current_page', $all_count ? $IMAP->list_page : 1);
// remove old rows (and clear selection if new list is empty) // remove old rows (and clear selection if new list is empty)

@ -65,7 +65,7 @@ else if ($RCMAIL->action == 'purge')
$OUTPUT->set_env('messagecount', 0); $OUTPUT->set_env('messagecount', 0);
$OUTPUT->set_env('pagecount', 0); $OUTPUT->set_env('pagecount', 0);
$OUTPUT->command('message_list.clear'); $OUTPUT->command('message_list.clear');
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text()); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text(), $mbox);
$OUTPUT->command('set_unread_count', $mbox, 0); $OUTPUT->command('set_unread_count', $mbox, 0);
$OUTPUT->command('set_quota', rcmail_quota_content()); $OUTPUT->command('set_quota', rcmail_quota_content());
rcmail_set_unseen_count($mbox, 0); rcmail_set_unseen_count($mbox, 0);

@ -320,7 +320,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
} }
if ($IMAP->threading) { if ($IMAP->threading) {
$OUTPUT->command('init_threads', (array) $roots); $OUTPUT->command('init_threads', (array) $roots, $mbox);
} }
} }

@ -96,7 +96,7 @@ $OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages); $OUTPUT->set_env('pagecount', $pages);
$OUTPUT->set_env('threading', (bool) $IMAP->threading); $OUTPUT->set_env('threading', (bool) $IMAP->threading);
$OUTPUT->set_env('current_page', $count ? $IMAP->list_page : 1); $OUTPUT->set_env('current_page', $count ? $IMAP->list_page : 1);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name);
$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text()); $OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text());
// add message rows // add message rows

@ -104,7 +104,7 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va
$OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX')); $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
rcmail_set_unseen_count($mbox, $unseen_count); rcmail_set_unseen_count($mbox, $unseen_count);
} }
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox);
if ($IMAP->threading) if ($IMAP->threading)
$count = get_input_value('_count', RCUBE_INPUT_POST); $count = get_input_value('_count', RCUBE_INPUT_POST);

@ -121,7 +121,7 @@ else
} }
$OUTPUT->command('set_quota', rcmail_quota_content()); $OUTPUT->command('set_quota', rcmail_quota_content());
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox);
if ($IMAP->threading) if ($IMAP->threading)
$count = get_input_value('_count', RCUBE_INPUT_POST); $count = get_input_value('_count', RCUBE_INPUT_POST);

@ -135,7 +135,7 @@ else {
$OUTPUT->set_env('search_request', $search_str ? $search_request : ''); $OUTPUT->set_env('search_request', $search_str ? $search_request : '');
$OUTPUT->set_env('messagecount', $count); $OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', ceil($count/$IMAP->page_size)); $OUTPUT->set_env('pagecount', ceil($count/$IMAP->page_size));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox);
$OUTPUT->send(); $OUTPUT->send();

Loading…
Cancel
Save