diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-06 19:55:56 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-06 19:55:56 +0000 |
commit | 585bf44e2b756eac2e1cfce7035ef237bc02a788 (patch) | |
tree | a9b431951c39bbac03c125fc6a13d3cca15eba9e /inc/infoutils.php | |
parent | 1418498c406caca058076e3d148e31daee800551 (diff) | |
download | rpg-585bf44e2b756eac2e1cfce7035ef237bc02a788.tar.gz rpg-585bf44e2b756eac2e1cfce7035ef237bc02a788.tar.bz2 |
amend $_SERVER to $INPUT->server
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r-- | inc/infoutils.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php index 3636d86a1..0992040d9 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -102,6 +102,8 @@ function getVersion(){ function check(){ global $conf; global $INFO; + /* @var Input $INPUT */ + global $INPUT; if ($INFO['isadmin'] || $INFO['ismanager']){ msg('DokuWiki version: '.getVersion(),1); @@ -204,7 +206,7 @@ function check(){ } if($INFO['userinfo']['name']){ - msg('You are currently logged in as '.$_SERVER['REMOTE_USER'].' ('.$INFO['userinfo']['name'].')',0); + msg('You are currently logged in as '.$INPUT->server->str('REMOTE_USER').' ('.$INFO['userinfo']['name'].')',0); msg('You are part of the groups '.join($INFO['userinfo']['grps'],', '),0); }else{ msg('You are currently not logged in',0); @@ -361,6 +363,9 @@ function dbg($msg,$hidden=false){ */ function dbglog($msg,$header=''){ global $conf; + /* @var Input $INPUT */ + global $INPUT; + // The debug log isn't automatically cleaned thus only write it when // debugging has been enabled by the user. if($conf['allowdebug'] !== 1) return; @@ -373,7 +378,7 @@ function dbglog($msg,$header=''){ $file = $conf['cachedir'].'/debug.log'; $fh = fopen($file,'a'); if($fh){ - fwrite($fh,date('H:i:s ').$_SERVER['REMOTE_ADDR'].': '.$msg."\n"); + fwrite($fh,date('H:i:s ').$INPUT->server->str('REMOTE_ADDR').': '.$msg."\n"); fclose($fh); } } |