summaryrefslogtreecommitdiff
path: root/program/steps/mail/list.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-06-30 12:26:15 +0200
committerAleksander Machniak <alec@alec.pl>2014-06-30 12:26:15 +0200
commitb8bcca7033b3d10eb7da4b7a1f9987ee9e25a45b (patch)
tree4d587c1a4b6f238a5e4ad2721a482346060ad482 /program/steps/mail/list.inc
parent789a7b5fd5986b4815837bbbaa27c2d95030ce0c (diff)
Display quota information for current folder not INBOX only (#1487993)
Diffstat (limited to 'program/steps/mail/list.inc')
-rw-r--r--program/steps/mail/list.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index 496c95146..2dcc40d17 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -68,6 +68,8 @@ if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') {
$OUTPUT->set_env('search_request', $search_request);
$OUTPUT->set_env('search_filter', $_SESSION['search_filter']);
+
+ $multifolder = is_a($_SESSION['search'][1], 'rcube_result_multifolder');
}
// fetch message headers
@@ -96,12 +98,13 @@ rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display
$pages = ceil($count/$RCMAIL->storage->get_pagesize());
+$page = $count ? $RCMAIL->storage->get_page() : 1;
$exists = $RCMAIL->storage->count($mbox_name, 'EXISTS', true);
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages);
$OUTPUT->set_env('threading', $threading);
-$OUTPUT->set_env('current_page', $count ? $RCMAIL->storage->get_page() : 1);
+$OUTPUT->set_env('current_page', $page);
$OUTPUT->set_env('exists', $exists);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name);
@@ -143,5 +146,9 @@ if ($mbox_name === $RCMAIL->config->get('trash_mbox')) {
$OUTPUT->command('set_trash_count', $exists);
}
+if ($page == 1) {
+ $OUTPUT->command('set_quota', $RCMAIL->quota_content(null, $multifolder ? 'INBOX' : $mbox_name));
+}
+
// send response
$OUTPUT->send();