Another place to save on an EXAMINE IMAP call
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 28 Jul 2009 03:09:33 +0000 (21:09 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 28 Jul 2009 03:09:33 +0000 (21:09 -0600)
imp/ajax.php

index 06063d0..610c61f 100644 (file)
@@ -487,6 +487,11 @@ case 'ShowPreview':
         'preview' => true,
     );
 
+    /* We know we are going to be exclusively dealing with this mailbox, so
+     * select it on the IMAP server (saves some STATUS calls). Open R/W to
+     * clear the RECENT flag. */
+    $imp_imap->ob->openMailbox($ptr['key'], Horde_Imap_Client::OPEN_READWRITE);
+
     $show_msg = new IMP_Views_ShowMessage();
     $result = (object)$show_msg->showMessage($args);
     break;