diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-05-25 21:55:09 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-05-25 21:55:09 +0000 |
| commit | 5326b1111b1433ec71c4a449ae099dd72a1a3776 (patch) | |
| tree | 16e1cc6ce59a073ef9a636537ba7df9a311b3472 | |
| parent | a276ec1059086526ffdd6a28675457ac63e608b7 (diff) | |
Fix buggy imap_root settings (closes #1484379)
git-svn-id: https://svn.roundcube.net/trunk@585 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc index dc18454c5..9ca6cf569 100644 --- a/roundcubemail/program/include/rcube_imap.inc +++ b/roundcubemail/program/include/rcube_imap.inc @@ -2275,7 +2275,7 @@ class rcube_imap function _mod_mailbox($mbox_name, $mode='in') { - if (empty($mbox_name) || (!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX') + if ((!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX') return $mbox_name; if (!empty($this->root_dir) && $mode=='in') @@ -2312,12 +2312,14 @@ class rcube_imap function get_id($uid, $mbox_name=NULL) { - return $this->_uid2id($uid, $this->_mod_mailbox($mbox_name)); + $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; + return $this->_uid2id($uid, $mailbox); } function get_uid($id,$mbox_name=NULL) { - return $this->_id2uid($id, $this->_mod_mailbox($mbox_name)); + $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; + return $this->_id2uid($id, $mailbox); } function _uid2id($uid, $mbox_name=NULL) |
