Last modified: 2012-05-03 02:42:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 32688 - Paraminfo for parameter "generator" of the query module shows too many types
Paraminfo for parameter "generator" of the query module shows too many types
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Low minor (vote)
: 1.19.0 release
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks: 31217
  Show dependency treegraph
 
Reported: 2011-11-28 18:07 UTC by Bergi
Modified: 2012-05-03 02:42 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bergi 2011-11-28 18:07:20 UTC
Currently opened the url above, and wondered why there are so many possible values for the "generator" parameter. More exactly: all names from "prop" and "list" are listed there!
Thats wrong, a quick filtering against the isGenerator-attribute of each querymodule shows that the following querymodules are listed there in spite of they are not usable as a generator:
* allusers
* blocks
* deletedrevs
* filearchive
* logevents
* tags
* usercontribs
* users
* gadgetcategories
* gadgets
* globalblocks
* abuselog
* abusefilters
* info
* revisions
* iwlinks
* langlinks
* imageinfo
* stashimageinfo
* extlinks
* categoryinfo
* pageprops
* flagged
* globalusage
Comment 1 Sam Reed (reedy) 2011-11-28 18:15:11 UTC
		// Allow the entire list of modules at first,
		// but during module instantiation check if it can be used as a generator.
		$this->mAllowedGenerators = array_merge( $this->mListModuleNames, $this->mPropModuleNames );



It's prevented from being used in code

		$generator = new $className ( $this, $generatorName );
		if ( !$generator instanceof ApiQueryGeneratorBase ) {
			$this->dieUsage( "Module $generatorName cannot be used as a generator", 'badgenerator' );
		}



Looks like it's just an output issue.. Because the filtering (in makeHelpMsgHelper) hasn't taken place


Lowering level

Needs a bit of refactoring to pull that code out, and the setup being done at the top... Or we just poke it and make the filtering before we build the list for paraminfo
Comment 2 Sam Reed (reedy) 2011-11-28 20:36:08 UTC
r104480

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links