From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/api/ApiPatrol.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'includes/api/ApiPatrol.php') 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' ); -- cgit v1.2.3-54-g00ecf