diff options
author | alecpl <alec@alec.pl> | 2008-04-02 17:27:35 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-04-02 17:27:35 +0000 |
commit | c5097c633b41b242a72ddbd1a8a486599520eabf (patch) | |
tree | 9b97d101c0b822a14f06b9e1b3f449a3ac160eb3 /program/include/rcube_imap.inc | |
parent | 164c7d4d26c47fe61c59404a955cfa059b0e67e5 (diff) |
#1484681
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r-- | program/include/rcube_imap.inc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 909af8de1..9a594854c 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -1648,16 +1648,14 @@ class rcube_imap /** * Subscribe to a specific mailbox(es) * - * @param string Mailbox name(s) + * @param array Mailbox name(s) * @return boolean True on success */ - function subscribe($mbox_name) + function subscribe($a_mboxes) { - if (is_array($mbox_name)) - $a_mboxes = $mbox_name; - else if (is_string($mbox_name) && strlen($mbox_name)) - $a_mboxes = explode(',', $mbox_name); - + if (!is_array($a_mboxes)) + $a_mboxes = array($a_mboxes); + // let this common function do the main work return $this->_change_subscription($a_mboxes, 'subscribe'); } @@ -1666,15 +1664,13 @@ class rcube_imap /** * Unsubscribe mailboxes * - * @param string Mailbox name(s) + * @param array Mailbox name(s) * @return boolean True on success */ - function unsubscribe($mbox_name) + function unsubscribe($a_mboxes) { - if (is_array($mbox_name)) - $a_mboxes = $mbox_name; - else if (is_string($mbox_name) && strlen($mbox_name)) - $a_mboxes = (array)$mbox_name; + if (!is_array($a_mboxes)) + $a_mboxes = array($a_mboxes); // let this common function do the main work return $this->_change_subscription($a_mboxes, 'unsubscribe'); |