From: Michael M Slusarz Date: Fri, 20 Aug 2010 23:04:14 +0000 (-0600) Subject: Special-use fixes. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8717bf1a8e8ab9fb3ebc609424f630d2c59177d0;p=horde.git Special-use fixes. This is a RETURN option, not a SELECT option. Some servers complain if they don't know what SPECIAL-USE return is. Although this seems to go against the draft RFC, use the create CAPABILITY string to determine whether to send the return option. --- diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index 03fc67a7c..2a2bc3874 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -1097,10 +1097,6 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base $select_opts[] = 'RECURSIVEMATCH'; } - if (!empty($options['special_use'])) { - $select_opts[] = 'SPECIAL-USE'; - } - if (!empty($select_opts)) { $cmd[] = $select_opts; } @@ -1120,6 +1116,11 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base $return_opts[] = 'CHILDREN'; } + if (!empty($options['special_use']) && + $this->queryCapability('CREATE-SPECIAL-USE')) { + $return_opts[] = 'SPECIAL-USE'; + } + if (!empty($options['status']) && $this->queryCapability('LIST-STATUS')) { $status_mask = array(