Skip to content

Commit

Permalink
Added the 'subscribed' return value from mailboxList API call
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 11, 2013
1 parent 32ee6b0 commit 14cd9ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions imp/docs/UPGRADING
Expand Up @@ -77,6 +77,16 @@ The following preferences have been removed::
pgp_scan_body


API Changes
-----------

These API calls have been changed::

- mailboxList

Added the 'subscribed' return value.



Upgrading IMP From 6.1.x To 6.1.4
=================================
Expand Down
8 changes: 7 additions & 1 deletion imp/lib/Api.php
Expand Up @@ -89,6 +89,7 @@ public function batchCompose($args = array(), $extra = array())
* - label: (string) Human readable label (UTF-8).
* - level: (integer) The child level of this element.
* - ob: (Horde_Imap_Client_Mailbox) A mailbox object.
* - subscribed: (boolean) True if mailbox is subscribed (@since 6.2.0).
*/
public function mailboxList()
{
Expand All @@ -102,11 +103,16 @@ public function mailboxList()

foreach ($iterator as $val) {
$mbox_ob = $val->mbox_ob;
$sub = $mbox_ob->sub;

$mboxes[] = array(
// TODO: Remove for IMP 7.
'a' => $sub ? 8 : 0,
'd' => $mbox_ob->namespace_delimiter,
'label' => $mbox_ob->label,
'level' => $val->level,
'ob' => $mbox_ob->imap_mbox_ob
'ob' => $mbox_ob->imap_mbox_ob,
'subscribed' => $sub
);
}

Expand Down

0 comments on commit 14cd9ec

Please sign in to comment.