Changeset bb8721aa in github
- Timestamp:
- Jun 3, 2010 4:02:12 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 058eb6c
- Parents:
- 05a631a
- Files:
-
- 7 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (4 diffs)
-
program/include/main.inc (modified) (2 diffs)
-
program/include/rcmail.php (modified) (2 diffs)
-
program/include/rcube_config.php (modified) (1 diff)
-
program/include/rcube_ldap.php (modified) (1 diff)
-
program/include/rcube_smtp.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r5bde172 rbb8721aa 2 2 =========================== 3 3 4 - Support dynamic hostname (%d/%n) variables in configuration options (#1485438) 4 5 - Add 'messages_list' hook (#1486266) 5 6 - Add request* event triggers in http_post/http_request (#1486054) -
config/main.inc.php.dist
rac8edbe rbb8721aa 62 62 // to display a pulldown menu or set one host as string. 63 63 // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// 64 // Supported replacement variables: 65 // %n - http hostname ($_SERVER['SERVER_NAME']) 66 // %d - domain (http hostname without the first part) 67 // For example %n = mail.domain.tld, %d = domain.tld 64 68 $rcmail_config['default_host'] = ''; 65 69 … … 91 95 // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// 92 96 // If left blank, the PHP mail() function is used 93 // Use %h variable as replacement for user's IMAP hostname 97 // Supported replacement variables: 98 // %h - user's IMAP hostname 99 // %n - http hostname ($_SERVER['SERVER_NAME']) 100 // %d - domain (http hostname without the first part) 101 // For example %n = mail.domain.tld, %d = domain.tld 94 102 $rcmail_config['smtp_server'] = ''; 95 103 … … 177 185 // This domain will be used to form e-mail addresses of new users 178 186 // Specify an array with 'host' => 'domain' values to support multiple hosts 187 // Supported replacement variables: 188 // %h - user's IMAP hostname 189 // %n - http hostname ($_SERVER['SERVER_NAME']) 190 // %d - domain (http hostname without the first part) 191 // For example %n = mail.domain.tld, %d = domain.tld 179 192 $rcmail_config['mail_domain'] = ''; 180 193 … … 375 388 $rcmail_config['ldap_public']['Verisign'] = array( 376 389 'name' => 'Verisign.com', 390 // Replacement variables supported in host names: 391 // %h - user's IMAP hostname 392 // %n - http hostname ($_SERVER['SERVER_NAME']) 393 // %d - domain (http hostname without the first part) 394 // For example %n = mail.domain.tld, %d = domain.tld 377 395 'hosts' => array('directory.verisign.com'), 378 396 'port' => 389, -
program/include/main.inc
r874ff4d rbb8721aa 1533 1533 } 1534 1534 1535 1535 1536 // for backward compatibility 1536 1537 function rcube_sess_unset($var_name=null) … … 1539 1540 1540 1541 $RCMAIL->session->remove($var_name); 1542 } 1543 1544 1545 // Replaces hostname variables 1546 function rcube_parse_host($name) 1547 { 1548 // %n - host 1549 $n = preg_replace('/:\d+$/', '', $_SERVER['SERVER_NAME']); 1550 // %d - domain name without first part, e.g. %d=mail.domain.tld, %m=domain.tld 1551 $d = preg_replace('/^[^\.]+\./', '', $n); 1552 // %h - IMAP host 1553 $h = $_SESSION['imap_host']; 1554 1555 $name = str_replace(array('%n', '%d', '%h'), array($n, $d, $h), $name); 1556 return $name; 1541 1557 } 1542 1558 -
program/include/rcmail.php
rf07d238 rbb8721aa 576 576 return false; 577 577 } 578 else if (!empty($config['default_host']) && $host != $config['default_host'])578 else if (!empty($config['default_host']) && $host != rcube_parse_host($config['default_host'])) 579 579 return false; 580 580 … … 744 744 } 745 745 else 746 $host = $default_host;746 $host = rcube_parse_host($default_host); 747 747 748 748 return $host; -
program/include/rcube_config.php
r2eb7943 rbb8721aa 278 278 } 279 279 else if (!empty($this->prop['mail_domain'])) 280 $domain = $this->prop['mail_domain'];281 280 $domain = rcube_parse_host($this->prop['mail_domain']); 281 282 282 return $domain; 283 283 } 284 285 284 285 286 286 /** 287 287 * Getter for error state -
program/include/rcube_ldap.php
r25fdec5 rbb8721aa 100 100 foreach ($this->prop['hosts'] as $host) 101 101 { 102 $host = rcube_parse_host($host); 102 103 $this->_debug("C: Connect [$host".($this->prop['port'] ? ':'.$this->prop['port'] : '')."]"); 103 104 -
program/include/rcube_smtp.php
r14a4ac5 rbb8721aa 74 74 )); 75 75 76 $smtp_host = str_replace('%h', $_SESSION['imap_host'],$CONFIG['smtp_server']);76 $smtp_host = rcube_parse_host($CONFIG['smtp_server']); 77 77 // when called from Installer it's possible to have empty $smtp_host here 78 78 if (!$smtp_host) $smtp_host = 'localhost';
Note: See TracChangeset
for help on using the changeset viewer.
