summaryrefslogtreecommitdiff
path: root/includes/api/ApiPatrol.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiPatrol.php')
-rw-r--r--includes/api/ApiPatrol.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/api/ApiPatrol.php b/includes/api/ApiPatrol.php
index 08835743..8066e655 100644
--- a/includes/api/ApiPatrol.php
+++ b/includes/api/ApiPatrol.php
@@ -42,13 +42,15 @@ class ApiPatrol extends ApiBase {
* Patrols the article or provides the reason the patrol failed.
*/
public function execute() {
+ global $wgUser;
+
$params = $this->extractRequestParams();
$rc = RecentChange::newFromID( $params['rcid'] );
if ( !$rc instanceof RecentChange ) {
$this->dieUsageMsg( array( 'nosuchrcid', $params['rcid'] ) );
}
- $retval = RecentChange::markPatrolled( $params['rcid'] );
+ $retval = $rc->doMarkPatrolled( $wgUser );
if ( $retval ) {
$this->dieUsageMsg( reset( $retval ) );
@@ -108,7 +110,11 @@ class ApiPatrol extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'https://www.mediawiki.org/wiki/API:Patrol';
+ }
+
public function getVersion() {
- return __CLASS__ . ': $Id: ApiPatrol.php 78437 2010-12-15 14:14:16Z catrope $';
+ return __CLASS__ . ': $Id: ApiPatrol.php 104449 2011-11-28 15:52:04Z reedy $';
}
}