summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-20 11:07:56 +0000
committeralecpl <alec@alec.pl>2010-09-20 11:07:56 +0000
commit11be9330dee677a25653dcb83adc343b8bf95a88 (patch)
treec5cf5ca36e893891a1fcf35f0cc711cab67399e6 /program/include/main.inc
parenteab71fdf7e4418f95f5f561d6fe4231caffb9397 (diff)
- Support %z variable in host configuration options (#1487003)
Diffstat (limited to 'program/include/main.inc')
-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;
}