diff options
author | alecpl <alec@alec.pl> | 2009-08-28 08:31:41 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-08-28 08:31:41 +0000 |
commit | f8a846c58997da50cb1737569d4c0d01f83b17d5 (patch) | |
tree | a423993ef5731e78cf133efba5402dc8c6ac8a63 | |
parent | b8ae99a6b38838045257c7dac6f52c66a0f6ef39 (diff) |
- simplified iil_C_(Un)Subscribe() return value
-rw-r--r-- | program/include/rcube_imap.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 78d44860f..d904edb9b 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -2890,7 +2890,7 @@ class rcube_imap private function _change_subscription($a_mboxes, $mode) { $updated = FALSE; - + if (is_array($a_mboxes)) foreach ($a_mboxes as $i => $mbox_name) { @@ -2898,15 +2898,12 @@ class rcube_imap $a_mboxes[$i] = $mailbox; if ($mode=='subscribe') - $result = iil_C_Subscribe($this->conn, $mailbox); + $updated = iil_C_Subscribe($this->conn, $mailbox); else if ($mode=='unsubscribe') - $result = iil_C_UnSubscribe($this->conn, $mailbox); - - if ($result>=0) - $updated = TRUE; + $updated = iil_C_UnSubscribe($this->conn, $mailbox); } - - // get cached mailbox list + + // get cached mailbox list if ($updated) { $a_mailbox_cache = $this->get_cache('mailboxes'); @@ -2918,7 +2915,7 @@ class rcube_imap $a_mailbox_cache = array_merge($a_mailbox_cache, $a_mboxes); else if ($mode=='unsubscribe') $a_mailbox_cache = array_diff($a_mailbox_cache, $a_mboxes); - + // write mailboxlist to cache $this->update_cache('mailboxes', $this->_sort_mailbox_list($a_mailbox_cache)); } |