From: Michael M Slusarz Date: Wed, 24 Feb 2010 21:28:32 +0000 (-0700) Subject: Need to open mailbox with SELECT for useful PERMFLAGS information. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ea7fd4c1648ec94a4b9d50b20903659eee8818ed;p=horde.git Need to open mailbox with SELECT for useful PERMFLAGS information. --- 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']);