diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-04 14:03:26 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-04 14:03:26 +0000 |
| commit | 65c4c3195cfe3c91b1b32791097f5be324681920 (patch) | |
| tree | 1251c7de82799def447151444c3b4fa29e166aef /roundcubemail/program/steps | |
| parent | 6a8d0cbf6fef417b356b76c56666d460127f319d (diff) | |
- Add possibility to force mailbox selection. There're situations where we're invoking
STATUS (for all messages count) and SELECT later for other operations. If we
call SELECT first, the STATUS will be not needed.
git-svn-id: https://svn.roundcube.net/trunk@4180 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/pagenav.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/mail/pagenav.inc b/roundcubemail/program/steps/mail/pagenav.inc index b62520fab..e295114e1 100644 --- a/roundcubemail/program/steps/mail/pagenav.inc +++ b/roundcubemail/program/steps/mail/pagenav.inc @@ -20,7 +20,13 @@ */ $uid = get_input_value('_uid', RCUBE_INPUT_GET); -$cnt = $IMAP->messagecount(NULL, 'ALL'); // Only messages, no threads here + +// Select mailbox first, for better performance +$mbox_name = $IMAP->get_mailbox_name(); +$IMAP->select_mailbox($mbox_name); + +// Get messages count (only messages, no threads here) +$cnt = $IMAP->messagecount(NULL, 'ALL'); if ($_SESSION['sort_col'] == 'date' && $_SESSION['sort_order'] != 'DESC' && empty($_REQUEST['_search']) && !$CONFIG['skip_deleted'] && !$IMAP->threading |
