summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--program/js/app.js16
-rw-r--r--program/steps/mail/check_recent.inc2
-rw-r--r--program/steps/mail/folders.inc2
-rw-r--r--program/steps/mail/func.inc2
-rw-r--r--program/steps/mail/list.inc2
-rw-r--r--program/steps/mail/mark.inc2
-rw-r--r--program/steps/mail/move_del.inc2
-rw-r--r--program/steps/mail/search.inc2
9 files changed, 22 insertions, 9 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 61d5f9a5b..2ae2c7726 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
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 option 'searchonly' for LDAP address books
- Add Priority filter to the messages list
diff --git a/program/js/app.js b/program/js/app.js
index 65d4f066f..a9fbe987d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1641,6 +1641,10 @@ function rcube_webmail()
if (!this.gui_objects.messagelist || !this.message_list)
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])
this.env.messages[uid] = {};
@@ -2091,8 +2095,12 @@ function rcube_webmail()
};
// 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++)
this.add_tree_icons(roots[n]);
this.expand_threads();
@@ -5463,8 +5471,12 @@ function rcube_webmail()
};
// 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);
// update page navigation buttons
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index c7d607cf9..e22cccca5 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -81,7 +81,7 @@ foreach ($a_mailboxes as $mbox_name) {
$OUTPUT->set_env('messagecount', $all_count);
$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);
// remove old rows (and clear selection if new list is empty)
diff --git a/program/steps/mail/folders.inc b/program/steps/mail/folders.inc
index 7ba6f0c50..fad2bf3e3 100644
--- a/program/steps/mail/folders.inc
+++ b/program/steps/mail/folders.inc
@@ -65,7 +65,7 @@ else if ($RCMAIL->action == 'purge')
$OUTPUT->set_env('messagecount', 0);
$OUTPUT->set_env('pagecount', 0);
$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_quota', rcmail_quota_content());
rcmail_set_unseen_count($mbox, 0);
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 57ad9c7c3..6ece17511 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -320,7 +320,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
}
if ($IMAP->threading) {
- $OUTPUT->command('init_threads', (array) $roots);
+ $OUTPUT->command('init_threads', (array) $roots, $mbox);
}
}
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index 1f6c21e43..9988a00b4 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -96,7 +96,7 @@ $OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages);
$OUTPUT->set_env('threading', (bool) $IMAP->threading);
$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());
// add message rows
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index 30ffec009..c232d8c48 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -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'));
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)
$count = get_input_value('_count', RCUBE_INPUT_POST);
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index e77979add..a42bc90cd 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -121,7 +121,7 @@ else
}
$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)
$count = get_input_value('_count', RCUBE_INPUT_POST);
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index c038d772f..d34454ff1 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -135,7 +135,7 @@ else {
$OUTPUT->set_env('search_request', $search_str ? $search_request : '');
$OUTPUT->set_env('messagecount', $count);
$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();