diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-20 11:07:56 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-20 11:07:56 +0000 |
| commit | b32207d5e1bfc68001b81d21aac2d511ce0c979e (patch) | |
| tree | ec9af7d31cd333838a08ba335f507a8b06a34440 | |
| parent | 29d7199ce0e4d8642c14ba78ab7e6f4e85ccd064 (diff) | |
- Support %z variable in host configuration options (#1487003)
git-svn-id: https://svn.roundcube.net/trunk@3977 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/config/main.inc.php.dist | 4 | ||||
| -rw-r--r-- | roundcubemail/program/include/main.inc | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 51033a281..1efdea12d 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -25,6 +25,7 @@ CHANGELOG RoundCube Webmail - Fix format=flowed handling (#1486989) - Fix when IMAP connection fails in 'get' action session shouldn't be destroyed (#1486995) - Fix list_cols is not updated after column dragging (#1486999) +- Support %z variable in host configuration options (#1487003) RELEASE 0.4 ----------- diff --git a/roundcubemail/config/main.inc.php.dist b/roundcubemail/config/main.inc.php.dist index df251c676..e036395d6 100644 --- a/roundcubemail/config/main.inc.php.dist +++ b/roundcubemail/config/main.inc.php.dist @@ -98,6 +98,7 @@ $rcmail_config['imap_timeout'] = 0; // %h - user's IMAP hostname // %n - http hostname ($_SERVER['SERVER_NAME']) // %d - domain (http hostname without the first part) +// %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %d = domain.tld $rcmail_config['smtp_server'] = ''; @@ -184,6 +185,7 @@ $rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str'; // %h - user's IMAP hostname // %n - http hostname ($_SERVER['SERVER_NAME']) // %d - domain (http hostname without the first part) +// %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %d = domain.tld $rcmail_config['username_domain'] = ''; @@ -193,6 +195,7 @@ $rcmail_config['username_domain'] = ''; // %h - user's IMAP hostname // %n - http hostname ($_SERVER['SERVER_NAME']) // %d - domain (http hostname without the first part) +// %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %d = domain.tld $rcmail_config['mail_domain'] = ''; @@ -400,6 +403,7 @@ $rcmail_config['ldap_public']['Verisign'] = array( // %h - user's IMAP hostname // %n - http hostname ($_SERVER['SERVER_NAME']) // %d - domain (http hostname without the first part) + // %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %d = domain.tld 'hosts' => array('directory.verisign.com'), 'port' => 389, diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 7492f6c0e..00fd0830f 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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; } |
