From: Sergio Santoro Date: Sun, 20 Jul 2014 13:47:21 +0000 (+0200) Subject: api.php: Use $wgRequest to retrieve User-agent string X-Git-Tag: 1.31.0-rc.0~14804^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=896c6fa363d19f9853ddf71c0e5a7f5a56b31540;p=lhc%2Fweb%2Fwiklou.git api.php: Use $wgRequest to retrieve User-agent string api.php was directly accessing $_SERVER superglobal. It should use WebRequest wrapper object instead. Change-Id: I244fb7a35476e9a35a5dc97f898d39c82c54b7fa --- diff --git a/api.php b/api.php index e8a911e3a1..80abc35c66 100644 --- a/api.php +++ b/api.php @@ -104,7 +104,7 @@ if ( $wgAPIRequestLog ) { wfTimestamp( TS_MW ), $endtime - $starttime, $wgRequest->getIP(), - $_SERVER['HTTP_USER_AGENT'] + $wgRequest->getHeader( 'User-agent' ) ); $items[] = $wgRequest->wasPosted() ? 'POST' : 'GET'; if ( $processor ) {