summaryrefslogtreecommitdiff
path: root/program/steps/mail/mark.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-06-11 08:40:39 +0000
committeralecpl <alec@alec.pl>2009-06-11 08:40:39 +0000
commitcd9a03685669a983167e8f5093e5b56e25923d54 (patch)
tree389d50956b6042123c71a0fa818487c2efe67d33 /program/steps/mail/mark.inc
parent7fd19309cc603053421c1c4a4e6607773b5b061d (diff)
- fix marking as DELETED with skip_deleted enabled
Diffstat (limited to 'program/steps/mail/mark.inc')
-rw-r--r--program/steps/mail/mark.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index 2ae1cdb2c..58a6f79df 100644
--- a/program/steps/mail/mark.inc
+++ b/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();