| | |
| | | * @param string $name Optional name pattern |
| | | * @param string $filter Optional filter |
| | | * @param string $rights Optional ACL requirements |
| | | * @param bool $skip_sort Enable to return unsorted list (for better performance) |
| | | * |
| | | * @return array List of mailboxes/folders |
| | | * @access public |
| | | */ |
| | | function list_mailboxes($root='', $name='*', $filter=null, $rights=null) |
| | | function list_mailboxes($root='', $name='*', $filter=null, $rights=null, $skip_sort=false) |
| | | { |
| | | $a_mboxes = $this->_list_mailboxes($root, $name, $filter, $rights); |
| | | |
| | |
| | | } |
| | | |
| | | // sort mailboxes |
| | | if (!$skip_sort) { |
| | | $a_mboxes = $this->_sort_mailbox_list($a_mboxes); |
| | | } |
| | | |
| | | return $a_mboxes; |
| | | } |
| | |
| | | * @param string $name Optional name pattern |
| | | * @param mixed $filter Optional filter |
| | | * @param string $rights Optional ACL requirements |
| | | * @param bool $skip_sort Enable to return unsorted list (for better performance) |
| | | * |
| | | * @return array Indexed array with folder names |
| | | */ |
| | | function list_unsubscribed($root='', $name='*', $filter=null, $rights=null) |
| | | function list_unsubscribed($root='', $name='*', $filter=null, $rights=null, $skip_sort=false) |
| | | { |
| | | // @TODO: caching |
| | | // Give plugins a chance to provide a list of mailboxes |
| | |
| | | } |
| | | |
| | | // filter folders and sort them |
| | | if (!$skip_sort) { |
| | | $a_mboxes = $this->_sort_mailbox_list($a_mboxes); |
| | | } |
| | | |
| | | return $a_mboxes; |
| | | } |