diff options
author | Michael Hamann <michael@content-space.de> | 2011-01-23 20:33:32 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-01-23 20:33:32 +0100 |
commit | fc756e0d4d88b37c01a9155e675a549430b00593 (patch) | |
tree | 7adc185d2c349788961ff7cb8f9bcb25afbce485 /inc/mail.php | |
parent | 8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03 (diff) | |
parent | 820923f1328bcfe6002831570eb65238411c5b70 (diff) | |
download | rpg-fc756e0d4d88b37c01a9155e675a549430b00593.tar.gz rpg-fc756e0d4d88b37c01a9155e675a549430b00593.tar.bz2 |
Merge branch 'master' into indexer_improvements
Conflicts:
inc/fulltext.php
inc/indexer.php
lib/exe/indexer.php
Diffstat (limited to 'inc/mail.php')
-rw-r--r-- | inc/mail.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/inc/mail.php b/inc/mail.php index fb163585a..aa9d195d1 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -37,14 +37,16 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '[' */ function mail_setup(){ global $conf; - global $INFO; + global $USERINFO; $replace = array(); - if(!empty($INFO['userinfo']['mail'])){ - $replace['@MAIL@'] = $INFO['userinfo']['mail']; + if(!empty($USERINFO['mail'])){ + $replace['@MAIL@'] = $USERINFO['mail']; }else{ - $replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST); + $host = @parse_url(DOKU_URL,PHP_URL_HOST); + if(!$host) $host = 'example.com'; + $replace['@MAIL@'] = 'noreply@'.$host; } if(!empty($_SERVER['REMOTE_USER'])){ @@ -53,8 +55,8 @@ function mail_setup(){ $replace['@USER@'] = 'noreply'; } - if(!empty($INFO['userinfo']['name'])){ - $replace['@NAME@'] = $INFO['userinfo']['name']; + if(!empty($USERINFO['name'])){ + $replace['@NAME@'] = $USERINFO['name']; }else{ $replace['@NAME@'] = ''; } @@ -225,6 +227,7 @@ function mail_encode_address($string,$header='',$names=true){ */ function mail_isvalid($email){ $validator = new EmailAddressValidator; + $validator->allowLocalAddresses = true; return $validator->check_email_address($email); } |