Disable cache when counting EXISTS messages

pull/190/head
Aleksander Machniak 11 years ago
parent 8f57ce136b
commit 9eda939676

@ -85,7 +85,7 @@ foreach ($a_mailboxes as $mbox_name) {
$OUTPUT->command('set_quota', $RCMAIL->quota_content()); $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 // "No-list" mode, don't get messages
if (empty($_POST['_list'])) { if (empty($_POST['_list'])) {
@ -146,7 +146,7 @@ foreach ($a_mailboxes as $mbox_name) {
// set trash folder state // set trash folder state
if ($mbox_name === $trash) { 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));
} }
} }

@ -93,7 +93,7 @@ rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display // update message count display
$pages = ceil($count/$RCMAIL->storage->get_pagesize()); $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('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages); $OUTPUT->set_env('pagecount', $pages);

@ -166,7 +166,7 @@ else {
$OUTPUT->command('set_trash_count', $exists); $OUTPUT->command('set_trash_count', $exists);
} }
else if ($target !== null && $target === $trash) { 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));
} }
} }

Loading…
Cancel
Save