summaryrefslogtreecommitdiff
path: root/plugins/archive/archive.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-30 10:32:48 +0100
committerAleksander Machniak <alec@alec.pl>2013-10-30 10:32:48 +0100
commit691cbc276d06fd3e4827e8b650471b243cbc6ff4 (patch)
tree8dea2fbd3bba880bb04d2d6ca65eb0308e8a55ee /plugins/archive/archive.php
parent60e1b34e33a2030b016f22a133ce03983588697b (diff)
Fix archive action for all messages in a folder (#1489405)
Diffstat (limited to 'plugins/archive/archive.php')
-rw-r--r--plugins/archive/archive.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 291ef1370..5ad197ac1 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -121,8 +121,16 @@ class archive extends rcube_plugin
$storage->set_folder(($current_mbox = rcube_utils::get_input_value('_mbox', RCUBE_INPUT_POST)));
$result = array('reload' => false, 'update' => false, 'errors' => array());
- $uids = explode(',', rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST));
$folders = array();
+ $uids = rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST);
+
+ if ($uids == '*') {
+ $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order());
+ $uids = $index->get();
+ }
+ else {
+ $uids = explode(',', $uids);
+ }
foreach ($uids as $uid) {
if (!$archive_folder || !($message = $rcmail->storage->get_message($uid))) {