From ea7fd4c1648ec94a4b9d50b20903659eee8818ed Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 24 Feb 2010 14:28:32 -0700 Subject: [PATCH] Need to open mailbox with SELECT for useful PERMFLAGS information. --- imp/lib/Imap/Flags.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imp/lib/Imap/Flags.php b/imp/lib/Imap/Flags.php index eeedf95e3..b3981afc8 100644 --- a/imp/lib/Imap/Flags.php +++ b/imp/lib/Imap/Flags.php @@ -71,6 +71,9 @@ class IMP_Imap_Flags * from the PERMANENTFLAGS IMAP response. */ if (!empty($options['mailbox'])) { try { + /* Make sure we are in R/W mailbox mode (SELECT). No flags are + * allowed in EXAMINE mode. */ + $GLOBALS['imp_imap']->ob()->openMailbox($options['mailbox'], Horde_Imap_Client::OPEN_READWRITE); $status = $GLOBALS['imp_imap']->ob()->status($options['mailbox'], Horde_Imap_Client::STATUS_PERMFLAGS); if (!in_array('\\*', $status['permflags'])) { $avail_flags = array_intersect($avail_flags, $status['permflags']); -- 2.11.0