Page MenuHomePhabricator

allpages thingis
Closed, ResolvedPublic

Description

apdir - similar to rvdir
apsuffix - the end of the game
apprtype - one value only?
apprlevel - change clear to 'user', to remove the logical ambiguous. Also enable to be able to have multiple values, for example not protected or sysop protected.

appr: to be able to specify more complex types of protections, example: edit protected AND move protected, edit protection is for autoconfirmed and move protection is for sysops (a common setup)


Version: unspecified
Severity: enhancement

Details

Reference
bz11634

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:58 PM
bzimport set Reference to bz11634.

(In reply to comment #0)

apdir - similar to rvdir

So that would be AtoZ and ZtoA. If you want it, you can get it...

apsuffix - the end of the game

See bug 10808 for why this is not gonna happen anytime soon.

apprtype - one value only?

So you want to be able to filter on edit|move also? Possible.

apprlevel - change clear to 'user', to remove the logical ambiguous. Also
enable to be able to have multiple values, for example not protected or sysop
protected.

So you want apprlevel=none and multivals. Note, though, that apprtype=edit|move&apprlevel=autoconfirmed|sysop is NOT gonna give you pages that have edit=autoconfirmed;move=sysop. Rather, it's gonna give you all pages that have EITHER edit or move protection set to EITHER autoconfirmed or sysop. Use generator=allpages&prop=info&inprop=protection to distinguish.

appr: to be able to specify more complex types of protections, example: edit
protected AND move protected, edit protection is for autoconfirmed and move
protection is for sysops (a common setup)

That's tricky, I don't know if it's reasonably doable. I'll come back to this when I take a serious look at this bug.

Assigning to self, will attempt a fix after the week end (sorry for the delay).

I've written a patch for this that I'll test and apply after the weekend (no access to my public key, test setup or diff program). The patch implements apdir ('AtoZ' or 'ZtoA'), and makes apprlevel and apprtype multivalue parameters. apsuffix is not doable (see bug 10808), and listing unprotected pages is not feasible either: it would result in massive queries that would kill any WMF wiki's database, for which Domas is sure to hunt me down and kill me in turn :D

As to the complex protections request: if you want all pages with edit=autoconfirmed and move=sysop, your best bet is probably to do something like

api.php?action=query&generator=allpages&gapprtype=edit&gapprlevel=autoconfirmed&prop=info&inprop=protection

And filter out all pages that don't have move=sysop. Alternatively, you can search for pages that appear in both the edit=autoconfirmed and move=sysop list, but the latter would probably be polluted too much with edit=sysop;move=sysop pages.

(In reply to comment #2)

As to the complex protections request: if you want all pages with
edit=autoconfirmed and move=sysop, your best bet is probably to do something
like

api.php?action=query&generator=allpages&gapprtype=edit&gapprlevel=autoconfirmed&prop=info&inprop=protection

And filter out all pages that don't have move=sysop. Alternatively, you can
search for pages that appear in both the edit=autoconfirmed and move=sysop
list, but the latter would probably be polluted too much with
edit=sysop;move=sysop pages.

problem with this approach is that you might not get any result, for example if the result limit is 500, and there are 501 pages with edit=autoconfirmed and 500 pages without move=sysop and those are the pages that are returned, you wont get the page(s) you want.

(In reply to comment #3)

problem with this approach is that you might not get any result, for example if
the result limit is 500, and there are 501 pages with edit=autoconfirmed and
500 pages without move=sysop and those are the pages that are returned, you
wont get the page(s) you want.

True. Maybe I'll add an AND/OR parameter that enables AND queries as well. I'll look into that tomorrow.

Added apdir and multival appr{type,level} in r26725. Enabling AND queries is very tricky due to the DB scheme, so I'm WONTFIXing that part for now.