summaryrefslogtreecommitdiff
path: root/includes/api/ApiPatrol.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/api/ApiPatrol.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/api/ApiPatrol.php')
-rw-r--r--includes/api/ApiPatrol.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/includes/api/ApiPatrol.php b/includes/api/ApiPatrol.php
index 8e6e8738..1332f263 100644
--- a/includes/api/ApiPatrol.php
+++ b/includes/api/ApiPatrol.php
@@ -24,10 +24,6 @@
* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- require_once ( 'ApiBase.php' );
-}
-
/**
* Allows user to patrol pages
* @ingroup API
@@ -42,15 +38,13 @@ 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 = $rc->doMarkPatrolled( $wgUser );
+ $retval = $rc->doMarkPatrolled( $this->getUser() );
if ( $retval ) {
$this->dieUsageMsg( reset( $retval ) );
@@ -104,7 +98,7 @@ class ApiPatrol extends ApiBase {
return 'patrol';
}
- protected function getExamples() {
+ public function getExamples() {
return array(
'api.php?action=patrol&token=123abc&rcid=230672766'
);