diff --git a/CHANGELOG b/CHANGELOG index 583bd3a7b..2397f03af 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -69,6 +69,7 @@ CHANGELOG Roundcube Webmail - Fix bug where Next/Prev button in mail view didn't work with multi-folder search result (#6793) - Fix bug where selection of columns on messages list wasn't working - Fix bug in converting multi-page Tiff images to Jpeg (#6824) +- Fix bug where handling multiple messages from multi-folder search result could not work (#6845) RELEASE 1.4-rc1 --------------- diff --git a/plugins/markasjunk/markasjunk.js b/plugins/markasjunk/markasjunk.js index 378bb305f..c00907bb3 100644 --- a/plugins/markasjunk/markasjunk.js +++ b/plugins/markasjunk/markasjunk.js @@ -26,10 +26,10 @@ rcube_webmail.prototype.markasjunk_mark = function(is_spam) { } rcube_webmail.prototype.rcmail_markasjunk_move = function(mbox, uids) { - var prev_uid = this.env.uid, a_uids = $.isArray(uids) ? uids : uids.split(","); + var prev_uid = this.env.uid; - if (this.message_list && a_uids.length == 1 && !this.message_list.in_selection([a_uids[0]])) - this.env.uid = a_uids[0]; + if (this.message_list && uids.length == 1 && !this.message_list.in_selection(uids[0])) + this.env.uid = uids[0]; if (mbox) this.move_messages(mbox); diff --git a/program/js/app.js b/program/js/app.js index d1cbbf45c..f5f506129 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3391,7 +3391,7 @@ function rcube_webmail() this.toggle_read_status = function(flag, a_uids) { var i, len = a_uids.length, - post_data = this.selection_post_data({_uid: this.uids_to_list(a_uids), _flag: flag}), + post_data = this.selection_post_data({_uid: a_uids, _flag: flag}), lock = this.display_message('markingmessage', 'loading'); // mark all message rows as read/unread @@ -3406,7 +3406,7 @@ function rcube_webmail() { var i, len = a_uids.length, win = this.env.contentframe ? this.get_frame_window(this.env.contentframe) : window, - post_data = this.selection_post_data({_uid: this.uids_to_list(a_uids), _flag: flag}), + post_data = this.selection_post_data({_uid: a_uids, _flag: flag}), lock = this.display_message('markingmessage', 'loading'); // mark all message rows as flagged/unflagged @@ -3454,7 +3454,7 @@ function rcube_webmail() this.flag_as_undeleted = function(a_uids) { var i, len = a_uids.length, - post_data = this.selection_post_data({_uid: this.uids_to_list(a_uids), _flag: 'undelete'}), + post_data = this.selection_post_data({_uid: a_uids, _flag: 'undelete'}), lock = this.display_message('markingmessage', 'loading'); for (i=0; istorage->set_folder(($_SESSION['mbox'] = $mbox)); - } + list($_uid, $mbox) = explode('-', $_uid, 2); + if (isset($_GET['_uid'])) $_GET['_uid'] = $_uid; + if (isset($_POST['_uid'])) $_POST['_uid'] = $_uid; + $_REQUEST['_uid'] = $_uid; + unset($_uid); + + // override mbox + if (!empty($mbox)) { + $_GET['_mbox'] = $mbox; + $_POST['_mbox'] = $mbox; + $RCMAIL->storage->set_folder($_SESSION['mbox'] = $mbox); + } } if (!empty($_SESSION['browser_caps']) && !$OUTPUT->ajax_call) {