$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. */
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');