From 7d78386657a02b905a763722cd5be84bac7195d8 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 5 Feb 2013 15:08:12 -0500 Subject: [PATCH] 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 --- includes/api/ApiQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ); } -- 2.20.1