diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-11 08:40:39 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-11 08:40:39 +0000 |
| commit | ac92842163c4bcf5fe0a3ef504818e2aaaa574b8 (patch) | |
| tree | 248d81653a9839e35511b6bb7f16a0626cd00518 /roundcubemail/program/steps | |
| parent | 8bf15e799d34573552ef326fabc2cf3f6822a6b6 (diff) | |
- fix marking as DELETED with skip_deleted enabled
git-svn-id: https://svn.roundcube.net/trunk@2635 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/mark.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/mark.inc b/roundcubemail/program/steps/mail/mark.inc index 2ae1cdb2c..58a6f79df 100644 --- a/roundcubemail/program/steps/mail/mark.inc +++ b/roundcubemail/program/steps/mail/mark.inc @@ -29,6 +29,14 @@ $a_flags_map = array( if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_value('_flag', RCUBE_INPUT_POST))) { $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); + + if ($flag == 'DELETED' && $CONFIG['skip_deleted'] && $_POST['_from'] != 'show') { + // count messages before changing anything + $old_count = $IMAP->messagecount(); + $old_pages = ceil($old_count / $IMAP->page_size); + $count = sizeof(explode(',', $uids)); + } + $marked = $IMAP->set_flag($uids, $flag); if ($marked == -1) { @@ -59,10 +67,6 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va else $OUTPUT->command('command', 'list'); } else { - // count messages before changing anything - $old_count = $IMAP->messagecount(); - $old_pages = ceil($old_count / $IMAP->page_size); - // refresh saved search set after moving some messages if (($search_request = get_input_value('_search', RCUBE_INPUT_GPC)) && $IMAP->search_set) { $_SESSION['search'][$search_request] = $IMAP->refresh_search(); |
