summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-05-25 21:55:09 +0000
committerthomascube <thomas@roundcube.net>2007-05-25 21:55:09 +0000
commitae4d7497f23ca7d0d07860f237896e6e4490e594 (patch)
treee931ccfd65a64d0c6ada56fd822c958066310a3a /program/include/rcube_imap.inc
parent2c633703e97eb6e7aa7ba840ef86b1fc1bd98ada (diff)
Fix buggy imap_root settings (closes #1484379)
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r--program/include/rcube_imap.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index dc18454c5..9ca6cf569 100644
--- a/program/include/rcube_imap.inc
+++ b/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)