diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 18:00:09 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 18:00:09 +0200 |
commit | 7fce8fbbde18152b3130bc169beaa9069c85b611 (patch) | |
tree | 90357ae2366a3c54f8b8e413fdcb8ded415c8899 /plugins/markasjunk | |
parent | f5799df36bbb986f018515e32b0c17e4acb5957e (diff) |
Adapt archive and markasjunk plugins to work with multi-folder search results
Diffstat (limited to 'plugins/markasjunk')
-rw-r--r-- | plugins/markasjunk/markasjunk.php | 11 |
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); } |