From a9bb27bf119f05e7ea2f6e15fbedacf60fbe8c8c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 6 Jul 2012 10:41:17 +0200 Subject: [PATCH] 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 --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.20.1