Page MenuHomePhabricator

API function to return random page(s) in selected namespace(s)
Closed, ResolvedPublic

Description

Author: overlordq

Description:
ApiQueryRandom

Basically add the functionality of Special:Random to the API with the addition of a parameter to return more then one result.

I've (tried) to create a working implementation but I'm sure my lack in knowledge of WP internals severely screwed it up. I'll


Version: 1.12.x
Severity: enhancement

Attached:

Details

Reference
bz12816

Event Timeline

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

overlordq wrote:

Patch to add it to the API

Attached:

Added in r30217.

(In reply to comment #0)

I've (tried) to create a working implementation but I'm sure my lack in
knowledge of WP internals severely screwed it up.

Your patch contained some duplicate code and only listed redirects (page_is_redirect != 0 rather than = 0), but I've seen far worse.