Last modified: 2008-09-04 15:18:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17445, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15445 - Add action=patrol
Add action=patrol
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: X!
: patch, patch-need-review
: 15447 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-02 19:54 UTC by Bryan Tong Minh
Modified: 2008-09-04 15:18 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed patch (5.41 KB, patch)
2008-09-03 00:04 UTC, X!
Details
Add RELEASE-NOTES (5.83 KB, patch)
2008-09-03 00:22 UTC, X!
Details
Uncomment the post-only stamement (5.69 KB, patch)
2008-09-03 02:11 UTC, X!
Details
Improvements (5.54 KB, patch)
2008-09-03 23:47 UTC, X!
Details
Used the wrong diff (5.36 KB, patch)
2008-09-04 00:11 UTC, X!
Details
Sigh...new patch (5.36 KB, patch)
2008-09-04 00:37 UTC, X!
Details
Add rcid to allowed params (5.59 KB, patch)
2008-09-04 01:52 UTC, X!
Details
Remove comments (5.07 KB, patch)
2008-09-04 02:56 UTC, X!
Details

Description Bryan Tong Minh 2008-09-02 19:54:15 UTC
Add a patrol module, action=patrol to the API.
Comment 1 Roan Kattouw 2008-09-02 20:28:55 UTC
*** Bug 15447 has been marked as a duplicate of this bug. ***
Comment 2 X! 2008-09-03 00:04:14 UTC
Created attachment 5267 [details]
Proposed patch

Patch implementing new action

Parameters:
title
id
token
gettoken
Comment 3 X! 2008-09-03 00:22:44 UTC
Created attachment 5268 [details]
Add RELEASE-NOTES
Comment 4 X! 2008-09-03 02:11:38 UTC
Created attachment 5269 [details]
Uncomment the post-only stamement
Comment 5 Roan Kattouw 2008-09-03 14:01:57 UTC
(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)
Comment 6 X! 2008-09-03 23:47:53 UTC
Created attachment 5282 [details]
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
Comment 7 X! 2008-09-04 00:11:53 UTC
Created attachment 5283 [details]
Used the wrong diff
Comment 8 X! 2008-09-04 00:37:04 UTC
Created attachment 5284 [details]
Sigh...new patch
Comment 9 X! 2008-09-04 01:52:01 UTC
Created attachment 5285 [details]
Add rcid to allowed params
Comment 10 Brion Vibber 2008-09-04 02:54:34 UTC
Quick note -- there's commented-out code in the latest version of the patch. If it's not needed, just take it out! :)
Comment 11 X! 2008-09-04 02:56:36 UTC
Created attachment 5286 [details]
Remove comments

If you wish, brion...
Comment 12 Roan Kattouw 2008-09-04 15:18:32 UTC
Modified version of patch applied in r40435, along with a split of the patrol code

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links