summaryrefslogtreecommitdiff
path: root/plugins/markasjunk
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-07 18:00:09 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-07 18:00:09 +0200
commit7fce8fbbde18152b3130bc169beaa9069c85b611 (patch)
tree90357ae2366a3c54f8b8e413fdcb8ded415c8899 /plugins/markasjunk
parentf5799df36bbb986f018515e32b0c17e4acb5957e (diff)
Adapt archive and markasjunk plugins to work with multi-folder search results
Diffstat (limited to 'plugins/markasjunk')
-rw-r--r--plugins/markasjunk/markasjunk.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php
index 4448b506c..d07b494f8 100644
--- a/plugins/markasjunk/markasjunk.php
+++ b/plugins/markasjunk/markasjunk.php
@@ -56,16 +56,15 @@ class markasjunk extends rcube_plugin
{
$this->add_texts('localization');
- $uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
- $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
-
$rcmail = rcmail::get_instance();
$storage = $rcmail->get_storage();
- $storage->unset_flag($uids, 'NONJUNK');
- $storage->set_flag($uids, 'JUNK');
+ foreach (rcmail::get_uids() as $mbox => $uids) {
+ $storage->unset_flag($uids, 'NONJUNK', $mbox);
+ $storage->set_flag($uids, 'JUNK', $mbox);
+ }
- if (($junk_mbox = $rcmail->config->get('junk_mbox')) && $mbox != $junk_mbox) {
+ if (($junk_mbox = $rcmail->config->get('junk_mbox'))) {
$rcmail->output->command('move_messages', $junk_mbox);
}