$this->dieUsageMsg( reset( $retval ) );
}
- $this->setWatch( $params['watchlist'], $titleObj );
+ $watch = 'preferences';
+ if ( isset( $params['watchlist'] ) ) {
+ $watch = $params['watchlist'];
+ }
+
+ // Watch pages
+ $this->setWatch( $watch, $titleObj, 'watchrollback' );
$info = array(
'title' => $titleObj->getPrefixedText(),
);
}
- public function getResultProperties() {
- return array(
- '' => array(
- 'title' => 'string',
- 'pageid' => 'integer',
- 'summary' => 'string',
- 'revid' => 'integer',
- 'old_revid' => 'integer',
- 'last_revid' => 'integer'
- )
- );
- }
-
public function getDescription() {
return array(
'Undo the last edit to the page. If the last user who edited the page made',
);
}
- public function getPossibleErrors() {
- return array_merge(
- parent::getPossibleErrors(),
- $this->getRequireOnlyOneParameterErrorMessages( array( 'title', 'pageid' ) ),
- array(
- array( 'invalidtitle', 'title' ),
- array( 'notanarticle' ),
- array( 'nosuchpageid', 'pageid' ),
- array( 'invaliduser', 'user' ),
- )
- );
- }
-
public function needsToken() {
return true;
}