* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- require_once ( 'ApiBase.php' );
-}
-
/**
* Allows user to patrol pages
* @ingroup API
if ( !$rc instanceof RecentChange ) {
$this->dieUsageMsg( array( 'nosuchrcid', $params['rcid'] ) );
}
- $retval = RecentChange::markPatrolled( $params['rcid'] );
+ $retval = $rc->doMarkPatrolled( $this->getUser() );
if ( $retval ) {
$this->dieUsageMsg( reset( $retval ) );
);
}
+ public function getResultProperties() {
+ return array(
+ '' => array(
+ 'rcid' => 'integer',
+ 'ns' => 'namespace',
+ 'title' => 'string'
+ )
+ );
+ }
+
public function getDescription() {
return 'Patrol a page or revision';
}
return 'patrol';
}
- protected function getExamples() {
+ public function getExamples() {
return array(
'api.php?action=patrol&token=123abc&rcid=230672766'
);
}
+ public function getHelpUrls() {
+ return 'https://www.mediawiki.org/wiki/API:Patrol';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}