diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-03-10 23:57:01 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-03-10 23:57:01 +0100 |
commit | f97db66038968542deefbf9817a3dd49b67b1904 (patch) | |
tree | 6995f5bfd7017999a743c327474afc7b9514d94f /inc/mail.php | |
parent | 6384941886832589f7bb3c13bc18115499cf9369 (diff) | |
parent | 9f12fc1cc9e916c3172a0cf8953ed70fd18f2ec1 (diff) | |
download | rpg-f97db66038968542deefbf9817a3dd49b67b1904.tar.gz rpg-f97db66038968542deefbf9817a3dd49b67b1904.tar.bz2 |
Merge remote-tracking branch 'origin/master' into userlink
Conflicts:
inc/parser/renderer.php
inc/template.php
Diffstat (limited to 'inc/mail.php')
-rw-r--r-- | inc/mail.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/inc/mail.php b/inc/mail.php index 0b60c0a5b..9994ac63e 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -40,6 +40,8 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '[' function mail_setup(){ global $conf; global $USERINFO; + /** @var Input $INPUT */ + global $INPUT; // auto constructed address $host = @parse_url(DOKU_URL,PHP_URL_HOST); @@ -53,11 +55,8 @@ function mail_setup(){ $replace['@MAIL@'] = $noreply; } - if(!empty($_SERVER['REMOTE_USER'])){ - $replace['@USER@'] = $_SERVER['REMOTE_USER']; - }else{ - $replace['@USER@'] = 'noreply'; - } + // use 'noreply' if no user + $replace['@USER@'] = $INPUT->server->str('REMOTE_USER', 'noreply', true); if(!empty($USERINFO['name'])){ $replace['@NAME@'] = $USERINFO['name']; |