diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 09:53:46 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 09:53:46 +0200 |
commit | 66536974fe12a02ca5ffcec4354bf5113282a0cc (patch) | |
tree | 034b848ec971008eab1003a2a9a401fb7020a517 /program/steps/mail/mark.inc | |
parent | c77a8497e7c4b04dd881e55341c779f6fe5ffa34 (diff) | |
parent | e3857bb6c2a2f9a4331a72b0bd74e0d70ee8a8a1 (diff) |
Merge branch 'dev-multi-folder-search'
Diffstat (limited to 'program/steps/mail/mark.inc')
-rw-r--r-- | program/steps/mail/mark.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index daa8c7e54..50243c636 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -36,7 +36,7 @@ $a_flags_map = array( 'unflagged' => 'UNFLAGGED', ); -if (($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) +if (($_uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) && ($flag = rcube_utils::get_input_value('_flag', rcube_utils::INPUT_POST)) ) { $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); @@ -45,10 +45,12 @@ if (($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) // count messages before changing anything $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize()); - $count = sizeof(explode(',', $uids)); } - $marked = $RCMAIL->storage->set_flag($uids, $flag); + foreach (rcmail_get_uids() as $mbox => $uids) { + $marked += (int)$RCMAIL->storage->set_flag($uids, $flag, $mbox); + $count += count($uids); + } if (!$marked) { // send error message @@ -128,7 +130,7 @@ if (($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) } // add new rows from next page (if any) - if ($count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { + if ($old_count && $_uids != '*' && ($jump_back || $nextpage_count > 0)) { $a_headers = $RCMAIL->storage->list_messages($mbox, NULL, rcmail_sort_column(), rcmail_sort_order(), $jump_back ? NULL : $count); |