X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=api.php;h=7775158ba2e41a84fee0285c2a0cbf091b356a3a;hb=f6676a84a491dcb690ac45f44692352c94fad47c;hp=92127474fc4f02936404ae437e5aa5961dbd859d;hpb=ea76d59537c580bdb2ddc8acc4c32fe38ae3f58d;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 92127474fc..7775158ba2 100644 --- a/api.php +++ b/api.php @@ -61,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. @@ -75,7 +75,7 @@ try { $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' ); }