From 896c6fa363d19f9853ddf71c0e5a7f5a56b31540 Mon Sep 17 00:00:00 2001 From: Sergio Santoro Date: Sun, 20 Jul 2014 15:47:21 +0200 Subject: [PATCH] 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 --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1