summaryrefslogtreecommitdiff
path: root/plugins/archive
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-30 11:02:34 +0100
committerAleksander Machniak <alec@alec.pl>2013-10-30 11:02:34 +0100
commit442f37c3139c21a7fc2d0bc81f9ac52ba157e986 (patch)
treeb2bfd2c86f9c9a6b2b0a90c839a0fef5a025ec40 /plugins/archive
parent07f161dd4e3aeaa7d2d21b8d03567c3f3af616d0 (diff)
Fix list update after archive action on search result
Diffstat (limited to 'plugins/archive')
-rw-r--r--plugins/archive/archive.js2
-rw-r--r--plugins/archive/archive.php6
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index 5097b53fa..17a1ecdb4 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -53,7 +53,7 @@ if (window.rcmail) {
// callback for server response
rcmail.addEventListener('plugin.move2archive_response', function(result) {
if (result.update)
- rcmail.command('checkmail'); // refresh list
+ rcmail.command('list'); // refresh list
});
})
}
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index ca32e7325..4a00d5f58 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -123,6 +123,7 @@ class archive extends rcube_plugin
$result = array('reload' => false, 'update' => false, 'errors' => array());
$folders = array();
$uids = rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST);
+ $search_request = get_input_value('_search', RCUBE_INPUT_GPC);
if ($uids == '*') {
$index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order());
@@ -216,6 +217,11 @@ class archive extends rcube_plugin
$rcmail->output->show_message($this->gettext('archived'), 'confirmation');
}
+ // refresh saved search set after moving some messages
+ if ($search_request && $rcmail->storage->get_search_set()) {
+ $_SESSION['search'] = $rcmail->storage->refresh_search();
+ }
+
if ($_POST['_from'] == 'show' && !empty($result['update'])) {
if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) {
$rcmail->output->command('show_message', $next);