diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-11 07:53:32 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-06-11 07:53:32 +0000 |
| commit | 8bf15e799d34573552ef326fabc2cf3f6822a6b6 (patch) | |
| tree | 07154403ad6d0b07879f95776bcee7d05e7949df | |
| parent | 61f6530cdf51fcac29cb57a4fcec9864ac5421de (diff) | |
- speed up empty folder selection
git-svn-id: https://svn.roundcube.net/trunk@2634 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/steps/mail/list.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/list.inc b/roundcubemail/program/steps/mail/list.inc index d32e93996..8ba0dd017 100644 --- a/roundcubemail/program/steps/mail/list.inc +++ b/roundcubemail/program/steps/mail/list.inc @@ -57,11 +57,10 @@ if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') // fetch message headers -if ($IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh']))) +if ($count = $IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh']))) $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); -$count = $IMAP->messagecount($mbox_name); -$unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh'])); +$unseen = $count ? $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh'])) : 0; // update message count display $pages = ceil($count/$IMAP->page_size); |
