summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/check_recent.inc4
-rw-r--r--program/steps/mail/list.inc2
-rw-r--r--program/steps/mail/move_del.inc2
-rw-r--r--program/steps/mail/search.inc10
4 files changed, 10 insertions, 8 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index cfdcda605..70f4c03a6 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -85,7 +85,7 @@ foreach ($a_mailboxes as $mbox_name) {
$OUTPUT->command('set_quota', $RCMAIL->quota_content());
}
- $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS'));
+ $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS', true));
// "No-list" mode, don't get messages
if (empty($_POST['_list'])) {
@@ -146,7 +146,7 @@ foreach ($a_mailboxes as $mbox_name) {
// set trash folder state
if ($mbox_name === $trash) {
- $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($mbox_name, 'EXISTS'));
+ $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($mbox_name, 'EXISTS', true));
}
}
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index c4a6df57b..929dda299 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -93,7 +93,7 @@ rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display
$pages = ceil($count/$RCMAIL->storage->get_pagesize());
-$exists = $RCMAIL->storage->count($mbox_name, 'EXISTS');
+$exists = $RCMAIL->storage->count($mbox_name, 'EXISTS', true);
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages);
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index c29985875..d98d49d1f 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -166,7 +166,7 @@ else {
$OUTPUT->command('set_trash_count', $exists);
}
else if ($target !== null && $target === $trash) {
- $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($trash, 'EXISTS'));
+ $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($trash, 'EXISTS', true));
}
}
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index e610e9137..4aa22e14b 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -162,9 +162,11 @@ if (!empty($result_h)) {
// remember last HIGHESTMODSEQ value (if supported)
// we need it for flag updates in check-recent
- $data = $RCMAIL->storage->folder_data($mbox_name);
- if (!empty($data['HIGHESTMODSEQ'])) {
- $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ if ($mbox !== null) {
+ $data = $RCMAIL->storage->folder_data($mbox);
+ if (!empty($data['HIGHESTMODSEQ'])) {
+ $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ }
}
}
// handle IMAP errors (e.g. #1486905)
@@ -189,7 +191,7 @@ $OUTPUT->set_env('search_filter', $_SESSION['search_filter']);
$OUTPUT->set_env('threading', $RCMAIL->storage->get_threading());
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', ceil($count/$RCMAIL->storage->get_pagesize()));
-$OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS'));
+$OUTPUT->set_env('exists', $mbox === null ? 0 : $RCMAIL->storage->count($mbox, 'EXISTS'));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox);
$OUTPUT->set_pagetitle($RCMAIL->gettext(array('name' => 'searchfor', 'vars' => array('q' => $str))));
$OUTPUT->send();