* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- // Eclipse helper - will be ignored in production
- require_once( "ApiBase.php" );
-}
-
/**
* @ingroup API
*/
$params = $this->extractRequestParams();
// User and title already validated in call to getTokenSalt from Main
- $titleObj = $this->getTitle();
- $articleObj = new Article( $titleObj );
+ $titleObj = $this->getRbTitle();
+ $pageObj = WikiPage::factory( $titleObj );
$summary = ( isset( $params['summary'] ) ? $params['summary'] : '' );
$details = array();
- $retval = $articleObj->doRollback( $this->getUser(), $summary, $params['token'], $params['markbot'], $details );
+ $retval = $pageObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details, $this->getUser() );
if ( $retval ) {
// We don't care about multiple errors, just report one of them
}
public function getTokenSalt() {
- return array( $this->getTitle()->getPrefixedText(), $this->getUser() );
+ return array( $this->getRbTitle()->getPrefixedText(), $this->getRbUser() );
}
- private function getUser() {
+ private function getRbUser() {
if ( $this->mUser !== null ) {
return $this->mUser;
}
/**
* @return Title
*/
- private function getTitle() {
+ private function getRbTitle() {
if ( $this->mTitleObj !== null ) {
return $this->mTitleObj;
}