Add action=patrol
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
Catrope, vvv
Projects
Reference
bz15445
Description

Author: Bryan.TongMinh

Description:
Add a patrol module, action=patrol to the API.


Version: 1.14.x
Severity: enhancement

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 10:18 PM
bzimport set Reference to bz15445.
bzimport created this task.Via LegacySep 2 2008, 7:54 PM
Catrope added a comment.Via ConduitSep 2 2008, 8:28 PM
  • Bug 15447 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitSep 3 2008, 12:04 AM

soxred93 wrote:

Proposed patch

Patch implementing new action

Parameters:
title
id
token
gettoken

attachment my.patch ignored as obsolete

bzimport added a comment.Via ConduitSep 3 2008, 12:22 AM

soxred93 wrote:

Add RELEASE-NOTES

attachment my.patch ignored as obsolete

bzimport added a comment.Via ConduitSep 3 2008, 2:11 AM

soxred93 wrote:

Uncomment the post-only stamement

attachment my.patch ignored as obsolete

Catrope added a comment.Via ConduitSep 3 2008, 2:01 PM

(In reply to comment #4)

Created an attachment (id=5269) [details]
Uncomment the post-only stamement

  • You don't need the title parameter, you don't need to create a Title and an Article and you don't need to check for their validity. You're not actually using any of these anywhere. An rcid is enough to patrol a change
  • The gettoken method for getting tokens is deprecated in favor of retrieving tokens through prop=info or prop=revisions. The old gettoken parameters are still there and won't be removed, of course (backwards compatibility), but we shouldn't be adding new ones. Patrol tokens should probably be added to list=recentchanges
  • Please use $wgUseRCPatrol instead of $GLOBALS['wgUseRCPatrol'], particularly because you do use $wgUser earlier on
  • The id parameter should be renamed to rcid and be specified as an integer
  • In the 'patrolnotenabled' message, please use "Patrolling _is_ not enabled on this wiki". That sounds a little anal, and maybe it is, but we're trying to avoid overly concise error messages
  • In the 'cantpatrol' message, "patrolling pages" is used, while we're really patrolling _changes_ (entries in the recentchanges table)
bzimport added a comment.Via ConduitSep 3 2008, 11:47 PM

soxred93 wrote:

Improvements

*Title parameter removed
*Gettoken commented out
*$wgUseRCPatrol and $wgUseNPPatrol enabled
*id is now rcid, and an extra check added, checking if rcid is equal to int(rcid).
*Disabled messages fixed.
*s/pages/changes

attachment my.patch ignored as obsolete

bzimport added a comment.Via ConduitSep 4 2008, 12:11 AM

soxred93 wrote:

Used the wrong diff

attachment my.patch ignored as obsolete

bzimport added a comment.Via ConduitSep 4 2008, 12:37 AM

soxred93 wrote:

Sigh...new patch

attachment my.patch ignored as obsolete

bzimport added a comment.Via ConduitSep 4 2008, 1:52 AM

soxred93 wrote:

Add rcid to allowed params

attachment my.patch ignored as obsolete

brion added a comment.Via ConduitSep 4 2008, 2:54 AM

Quick note -- there's commented-out code in the latest version of the patch. If it's not needed, just take it out! :)

bzimport added a comment.Via ConduitSep 4 2008, 2:56 AM

soxred93 wrote:

Remove comments

If you wish, brion...

Attached: my.patch

Catrope added a comment.Via ConduitSep 4 2008, 3:18 PM

Modified version of patch applied in r40435, along with a split of the patrol code

Add Comment