From: Alexandre Emsenhuber Date: Fri, 6 Jul 2012 08:41:17 +0000 (+0200) Subject: Pass the full context to the ApiMain instance from api.php. X-Git-Tag: 1.31.0-rc.0~23116^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=a9bb27bf119f05e7ea2f6e15fbedacf60fbe8c8c;p=lhc%2Fweb%2Fwiklou.git Pass the full context to the ApiMain instance from api.php. Passing only the WebRequest instance is not the best thing when it accepts a complete context. Change-Id: If02148c850b395a2382f87cbeafbc25887ce8728 --- diff --git a/api.php b/api.php index 1d7585798c..9e1f5dd334 100644 --- a/api.php +++ b/api.php @@ -70,7 +70,7 @@ $wgTitle = Title::makeTitle( NS_MAIN, 'API' ); * is some form of an ApiMain, possibly even one that produces an error message, * but we don't care here, as that is handled by the ctor. */ -$processor = new ApiMain( $wgRequest, $wgEnableWriteAPI ); +$processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI ); // Process data & print results $processor->execute();