From 26a0c8ddd70ff4fb2ba0ec1319715b528c05c7be Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 26 Mar 2009 19:15:53 -0600 Subject: [PATCH] Better location to put this. Prevents some unnecessary EXAMINE calls. --- imp/mailbox.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/imp/mailbox.php b/imp/mailbox.php index 3c1a8babb..6bc57ab2a 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -72,12 +72,6 @@ if (!empty($conf['hooks']['mbox_redirect'])) { $search_mbox = $imp_search->isSearchMbox(); $vfolder = $imp_search->isVFolder(); -/* We know we are going to be exclusively dealing with this mailbox, so - * select it on the IMAP server (saves some STATUS calls). */ -if (!$search_mbox) { - $imp_imap->ob->openMailbox($imp_mbox['mailbox']); -} - /* There is a chance that this page is loaded directly via message.php. If so, * don't re-include config files, and the following variables will already be * set: $actionID, $start. */ @@ -227,6 +221,12 @@ case 'login_compose': break; } +/* We know we are going to be exclusively dealing with this mailbox, so + * select it on the IMAP server (saves some STATUS calls). */ +if (!$search_mbox) { + $imp_imap->ob->openMailbox($imp_mbox['mailbox']); +} + /* Token to use in requests */ $mailbox_token = IMP::getRequestToken('imp.mailbox'); -- 2.11.0