summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 7492f6c0e..00fd0830f 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1588,8 +1588,10 @@ function rcube_parse_host($name)
$d = preg_replace('/^[^\.]+\./', '', $n);
// %h - IMAP host
$h = $_SESSION['imap_host'];
+ // %z - IMAP domain without first part, e.g. %h=imap.domain.tld, %z=domain.tld
+ $z = preg_replace('/^[^\.]+\./', '', $h);
- $name = str_replace(array('%n', '%d', '%h'), array($n, $d, $h), $name);
+ $name = str_replace(array('%n', '%d', '%h', '%z'), array($n, $d, $h, $z), $name);
return $name;
}