summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.inc22
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');