summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-01-13 12:37:51 +0000
committeralecpl <alec@alec.pl>2010-01-13 12:37:51 +0000
commit18cdf6b15547f85b7ff369a5777451f40b149ea0 (patch)
tree070c2b10a3eacfece9515007e5b8a4d198d58385 /program/include
parent7296ff7a61c63f7b1b10793bbd5cab2f9b73b01e (diff)
- small code improvement in rcube_imap::mod_mailbox()
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 2408fa2ee..8d200363b 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2893,11 +2893,13 @@ class rcube_imap
if ((!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX')
return $mbox_name;
- if (!empty($this->root_dir) && $mode=='in')
- $mbox_name = $this->root_dir.$this->delimiter.$mbox_name;
- else if (strlen($this->root_dir) && $mode=='out')
- $mbox_name = substr($mbox_name, strlen($this->root_dir)+1);
-
+ if (!empty($this->root_dir)) {
+ if ($mode=='in')
+ $mbox_name = $this->root_dir.$this->delimiter.$mbox_name;
+ else if (!empty($mbox_name)) // $mode=='out'
+ $mbox_name = substr($mbox_name, strlen($this->root_dir)+1);
+ }
+
return $mbox_name;
}