Page MenuHomePhabricator

It's unclear what the default values for RecentChangesPageGenerators arguments do
Closed, ResolvedPublic

Description

Author: themineo+wikibz

Description:
RecentChangesPageGenerator takes a few arguments like showMinor, showAnon, ... that are supposed to be boolean. However, they all have a default value of None, but the documentation only covers the case where they're either True or False. (The same is true for the recentchanges method in site.py that the generator uses.)


Version: core-(2.0)
Severity: normal

Details

Reference
bz56035

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:26 AM
bzimport set Reference to bz56035.
bzimport added a subscriber: Unknown Object (????).

In this case if the parameter is None, it doesn't specify a preference, so it uses the API default, which can be seen at [[mw:API:Recentchanges]]

themineo+wikibz wrote:

That page doesn't tell me if '!minor' or 'minor' is the default either.

themineo+wikibz wrote:

Ah, sorry, that page does actually make it more clear that the default is 'just list all edits'.

Hrm. Then we still have an issue, as showMinor=True does not imply *only* minor edits are shown, which is what passing 'minor' to the API means.

showMinor=True shows *only* minor edits. Docstring looks OK to me:

@param showMinor: if True, only list minor edits; if False (and not None), only list non-minor edits

To be really picky, it should be specified that None shows all ...
Anyhow, I added to Pagegenerators additional args present in site.recentchanges() and updated doc string.

Change 106122 had a related patch set uploaded by Mpaa:
(bug 56035) RecentChangesPageGenerators arguments do

https://gerrit.wikimedia.org/r/106122

Change 106122 merged by jenkins-bot:
(bug 56035) RecentChangesPageGenerators arguments do

https://gerrit.wikimedia.org/r/106122