X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=api.php;h=80abc35c6620fd243b1bb25eac2cb79e754ba60a;hb=0ea24459f3e0b83b02cfabd40da2205e4601b9f9;hp=554c2726bc188772192c25b1824f7ec46da193a0;hpb=d9d4fa85f889185716dfa96b5ce5a5140c126c0e;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 554c2726bc..80abc35c66 100644 --- a/api.php +++ b/api.php @@ -34,13 +34,12 @@ define( 'MW_API', true ); // Bail if PHP is too low -if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) { +if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) { // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ require dirname( __FILE__ ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'api.php' ); } -// Initialise common code. require __DIR__ . '/includes/WebStart.php'; wfProfileIn( 'api.php' ); @@ -105,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 ) {