summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/archive/archive.js9
-rw-r--r--plugins/archive/archive.php12
2 files changed, 19 insertions, 2 deletions
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index 3500b9fe4..cf44b74d4 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -15,7 +15,14 @@ function rcmail_archive(prop)
}
else {
// let the server sort the messages to the according subfolders
- var post_data = { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox };
+ var post_data = { _uid: rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox };
+
+ if (rcmail.env.display_next && rcmail.env.next_uid)
+ post_data._next_uid = rcmail.env.next_uid;
+
+ if (rcmail.env.action)
+ post_data._from = rcmail.env.action;
+
rcmail.http_post('plugin.move2archive', post_data);
}
}
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 420f6918b..291ef1370 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -208,7 +208,17 @@ class archive extends rcube_plugin
$rcmail->output->show_message($this->gettext('archived'), 'confirmation');
}
- $rcmail->output->command('plugin.move2archive_response', $result);
+ if ($_POST['_from'] == 'show' && !empty($result['update'])) {
+ if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) {
+ $rcmail->output->command('show_message', $next);
+ }
+ else {
+ $rcmail->output->command('command', 'list');
+ }
+ }
+ else {
+ $rcmail->output->command('plugin.move2archive_response', $result);
+ }
}
/**