summaryrefslogtreecommitdiff
path: root/inc/mail.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-06 19:55:56 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-06 19:55:56 +0000
commit585bf44e2b756eac2e1cfce7035ef237bc02a788 (patch)
treea9b431951c39bbac03c125fc6a13d3cca15eba9e /inc/mail.php
parent1418498c406caca058076e3d148e31daee800551 (diff)
downloadrpg-585bf44e2b756eac2e1cfce7035ef237bc02a788.tar.gz
rpg-585bf44e2b756eac2e1cfce7035ef237bc02a788.tar.bz2
amend $_SERVER to $INPUT->server
Diffstat (limited to 'inc/mail.php')
-rw-r--r--inc/mail.php9
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'];