From: Brad Jorsch Date: Tue, 5 Feb 2013 20:08:12 +0000 (-0500) Subject: API: Fix using the same module as generator and prop X-Git-Tag: 1.31.0-rc.0~20795^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=7d78386657a02b905a763722cd5be84bac7195d8;p=lhc%2Fweb%2Fwiklou.git API: Fix using the same module as generator and prop Change Ie2dee41e introduced a bug when using the same module as both generator and prop, e.g. ?action=query&titles=Main_Page&generator=categories&prop=categories The generator should be an uncached instance of the module. Change-Id: I80c8b3a715f266a61614c1e1d02aa80b72643ec8 --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index fa1b2d3874..35dd6954ae 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -583,7 +583,7 @@ class ApiQuery extends ApiBase { * @return ApiQueryGeneratorBase */ public function newGenerator( $generatorName ) { - $generator = $this->mModuleMgr->getModule( $generatorName ); + $generator = $this->mModuleMgr->getModule( $generatorName, null, true ); if ( $generator === null ) { $this->dieUsage( "Unknown generator=$generatorName", 'badgenerator' ); }