diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-12-25 10:33:06 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-12-25 10:33:06 +0100 |
commit | da5fa28d5705ab2b9991f39741f2a8f1751a25ad (patch) | |
tree | 8a9ae216a1cd75ae91c7e86342896002c0ee5c70 /program/steps/mail/list.inc | |
parent | 772bec6789ed4c6ee460577fd567717fac1250d4 (diff) |
Display different icons when Trash folder is empty or full (#1485775)
Diffstat (limited to 'program/steps/mail/list.inc')
-rw-r--r-- | program/steps/mail/list.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index 91c53e852..277564c38 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -90,12 +90,14 @@ if (empty($search_request) && empty($a_headers)) { rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen); // 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'); + $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('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); +$OUTPUT->set_env('exists', $exists); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name); // add message rows @@ -123,5 +125,10 @@ else { $OUTPUT->show_message('nomessagesfound', 'notice'); } +// set trash folder state +if ($mbox_name === $RCMAIL->config->get('trash_mbox')) { + $OUTPUT->command('set_trash_count', $exists); +} + // send response $OUTPUT->send(); |