X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=api.php;h=ea2f60aef2de0c455a58f40a3c872e9c23868102;hb=4459924fc9e469c6ddb8d588cdfa23e441613439;hp=7788a36c2f952e33860018752218fdbc6e119481;hpb=0290eccb8d6be6db0bc2b6ab4b30ed3311759898;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 7788a36c2f..ea2f60aef2 100644 --- a/api.php +++ b/api.php @@ -30,6 +30,8 @@ * @file */ +use MediaWiki\Logger\LegacyLogger; + // So extensions (and other code) can check whether they're running in API mode define( 'MW_API', true ); @@ -59,7 +61,7 @@ if ( !$wgEnableAPI ) { // Set a dummy $wgTitle, because $wgTitle == null breaks various things // In a perfect world this wouldn't be necessary -$wgTitle = Title::makeTitle( NS_MAIN, 'API' ); +$wgTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for API calls set in api.php' ); // RequestContext will read from $wgTitle, but it will also whine about it. // In a perfect world this wouldn't be necessary either. @@ -124,7 +126,7 @@ if ( $wgAPIRequestLog ) { } else { $items[] = "failed in ApiBeforeMain"; } - MWLoggerLegacyLogger::emit( implode( ',', $items ) . "\n", $wgAPIRequestLog ); + LegacyLogger::emit( implode( ',', $items ) . "\n", $wgAPIRequestLog ); wfDebug( "Logged API request to $wgAPIRequestLog\n" ); }