X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=api.php;h=6e75fb746ae672de4f99b3bc18b6b718fa17a9a1;hb=d0e9e163aacda1579e8006ee9d11fefafbde93b8;hp=83c1373c14a97b645ad1d7948e1b774ded6806d0;hpb=abb7c6792fab5e9a6e0c088dd820fd3d74c13059;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 83c1373c14..6e75fb746a 100644 --- a/api.php +++ b/api.php @@ -68,7 +68,7 @@ try { $processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI ); // Last chance hook before executing the API - Hooks::run( 'ApiBeforeMain', array( &$processor ) ); + Hooks::run( 'ApiBeforeMain', [ &$processor ] ); if ( !$processor instanceof ApiMain ) { throw new MWException( 'ApiBeforeMain hook set $processor to a non-ApiMain class' ); } @@ -88,12 +88,12 @@ $endtime = microtime( true ); // Log the request if ( $wgAPIRequestLog ) { - $items = array( + $items = [ wfTimestamp( TS_MW ), $endtime - $starttime, $wgRequest->getIP(), $wgRequest->getHeader( 'User-agent' ) - ); + ]; $items[] = $wgRequest->wasPosted() ? 'POST' : 'GET'; if ( $processor ) { try {