X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=api.php;h=6e75fb746ae672de4f99b3bc18b6b718fa17a9a1;hp=83c1373c14a97b645ad1d7948e1b774ded6806d0;hb=6bb1170e2f3539218965d1ceaa2cfc5e6197f465;hpb=4618f70793d1178ca4c646ef397cf17b1cc70b44 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 {