| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // for backward compatibility |
| | | function rcube_sess_unset($var_name=null) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | // Replaces hostname variables |
| | | function rcube_parse_host($name) |
| | | { |
| | | // %n - host |
| | | $n = preg_replace('/:\d+$/', '', $_SERVER['SERVER_NAME']); |
| | | // %d - domain name without first part, e.g. %d=mail.domain.tld, %m=domain.tld |
| | | $d = preg_replace('/^[^\.]+\./', '', $n); |
| | | // %h - IMAP host |
| | | $h = $_SESSION['imap_host']; |
| | | |
| | | $name = str_replace(array('%n', '%d', '%h'), array($n, $d, $h), $name); |
| | | return $name; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * E-mail address validation |
| | | */ |