Last modified: 2007-06-17 08:26:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12274, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10274 - generator=watchlist complains about gwlprop even if it's not set
generator=watchlist complains about gwlprop even if it's not set
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.11.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-15 14:59 UTC by Roan Kattouw
Modified: 2007-06-17 08:26 UTC (History)
2 users (show)

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


Attachments
Fixes unjustified generator=watchlist gwlprop error (679 bytes, patch)
2007-06-15 14:59 UTC, Roan Kattouw
Details

Description Roan Kattouw 2007-06-15 14:59:32 UTC
Created attachment 3781 [details]
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.
Comment 1 Yuri Astrakhan 2007-06-17 08:11:17 UTC
Thanks for the report and the patch. I will allow gwlprop to be specified to be consistent and to simplify design.
Comment 2 Yuri Astrakhan 2007-06-17 08:25:33 UTC
Fixed in r23043
Comment 3 Yuri Astrakhan 2007-06-17 08:26:14 UTC
Oops, forgot to mark as fixed.

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


Navigation
Links