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: ApiQueryRandom.php

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 10:06 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz12816.
bzimport created this task.Via LegacyJan 28 2008, 10:21 AM
bzimport added a comment.Via ConduitJan 28 2008, 10:22 AM

overlordq wrote:

Patch to add it to the API

Attached: apr_patch.patch

Catrope added a comment.Via ConduitJan 28 2008, 1:58 PM

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.

Add Comment