Page MenuHomePhabricator

generator=watchlist complains about gwlprop even if it's not set
Closed, ResolvedPublic

Description

Fixes unjustified generator=watchlist gwlprop error

http://www.mediawiki.org/w/api.php?action=query&prop=info&generator=watchlist

gives:

<error code="gwlparams" info="gwlprop parameter may not be used in a generator">

while gwlprop wasn't set. This is because the code assumes the default for gwlprop (ids|title|flags), and then complains that it's not empty. Setting gwlprop to an empty value doesn't work either, so there is currently no way to use list=watchlist as a generator.

The attached patch fixes this by only throwing an error if gwlprop is not set to its default value. The downside of this is that

api.php?action=query&prop=info&generator=watchlist&gwlprop=ids|title|flags

won't cause an error, but it won't affect the query result either.


Version: 1.11.x
Severity: normal

Attached:

Details

Reference
bz10274

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:52 PM
bzimport set Reference to bz10274.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for the report and the patch. I will allow gwlprop to be specified to be consistent and to simplify design.

Oops, forgot to mark as fixed.