* @file
*/
+use MediaWiki\Logger\LegacyLogger;
+
// So extensions (and other code) can check whether they're running in API mode
define( 'MW_API', true );
$processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI );
// Last chance hook before executing the API
- wfRunHooks( 'ApiBeforeMain', array( &$processor ) );
+ Hooks::run( 'ApiBeforeMain', array( &$processor ) );
if ( !$processor instanceof ApiMain ) {
throw new MWException( 'ApiBeforeMain hook set $processor to a non-ApiMain class' );
}
} else {
$items[] = "failed in ApiBeforeMain";
}
- MWLoggerLegacyLogger::emit( implode( ',', $items ) . "\n", $wgAPIRequestLog );
+ LegacyLogger::emit( implode( ',', $items ) . "\n", $wgAPIRequestLog );
wfDebug( "Logged API request to $wgAPIRequestLog\n" );
}