As of r42471 [1], prop=revisions&rvprop=content will no longer throw an
error when too many titles or revisions are specified, but will throw a
warning and ignore the superfluous titles/revisions. The warning message
is identical to the one issued when too many values are specified for
the titles or revids parameter.
This change was made to fix bug 16074 [2], which occurred when a
generator with gXXlimit=max (or any sufficiently high limit, really) was
used to feed prop=revisions&rvprop=content, which would then throw an
error because it was fed too many titles or revisions. However, the
generator is not aware that prop=revisions threw away most of its
results, and will set a query-continue as if this didn't happen. If this
query-continue value is used by the client, a (potentially large) number
of results will be skipped. When continuing such a request (i.e. one
with a generator feeding prop=revisions&rvprop=content with a high or
maximum limit), you have to set gXXlimit to a sufficiently low value
first, so prop=revisions doesn't receive too many results and doesn't
throw stuff away. The right number can be found in the text of the
warning message, which is always something like "Too many values
supplied for parameter 'titles': the limit is 50" (note that both
'titles' and the number 50 may vary).
Finally, it should be noted that this behavior can only occur with
prop=revisions&rvprop=content and only when a generator is used to feed
it. All other modules and all uses of prop=revisions not involving both
rvprop=content and a generator are not affected.
Roan Kattouw (Catrope)
[1] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/42471
[2] https://bugzilla.wikimedia.org/show_bug.cgi?id=16074
As of r41652 [1], action=protect allows the user to specify different
expiry timestamps for different protections, something the UI has
supported for a while.
To support this, the expiry parameter has changed to accept multiple
values, and even duplicate values. The first expiry timestamp will apply
to the first protection, the second to the second, etc. The number of
values in the expiry parameter must be equal to the number of values in
the protections parameter, or an error will occur (for details on the
new error message, see [2]). To preserve backwards compatibility,
setting a single value in the expiry parameter is always allowed: in
that case, all specified protections will have the same expiry timestamp.
Example requests:
api.php?action=protect&token=123ABC&title=Foo&protections=edit=sysop|move=sysop&expiry=infinite
Will add the protections edit=sysop and move=sysop, both of which will
never expire
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop&expiry=20081104000000|infinite
Will add the protections edit=autoconfirmed and move=sysop; the first
will expire on November 4, 2008, the second will never expire
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop|read=user&expiry=20081104000000|infinite
Will cause an error, because 2 expiries were given for 3 protections
api.php?action=protect&token=123ABC&title=Foo&protections=edit=autoconfirmed|move=sysop&expiry=20081104000000|infinite|infinite
Will cause an error, because 3 expiries were given for 2 protections
The output format has also been changed, so multiple expiry times can be
listed.
Old format:
<protect title="Foo" reason="" expiry="infinite">
<protections edit="sysop" move="sysop" />
</protect>
New format:
<protect title="Foo" reason="">
<protections>
<protection edit="sysop" expiry="infinite" />
<protection move="sysop" expiry="infinite" />
</protections>
</protect>
Additionally, the invalidexpiry and pastexpiry error messages have been
changed to mention the expiry timestamp they're referring to. In the new
messages, EXPIRY is replaced by the faulty expiry timestamp.
Old messages:
* code: invalidexpiry
** info: Invalid expiry time
* code: pastexpiry
** info: Expiry time is in the past
New messages:
* code: invalidexpiry
** info: Invalid expiry time ``EXPIRY''
* code: pastexpiry
** info: Expiry time ``EXPIRY'' is in the past
For the newly added error message toofewexpiries or more information
about action=protect, see the documentation at www.mediawiki.org [2].
[1] http://svn.wikimedia.org/viewvc/mediawiki/?view=rev&rev=41652
[2] http://www.mediawiki.org/wiki/API:Edit_-_Protect