$this->checkPermissions( $this->getUser() );
$sourceUrl = $this->file->getArchiveVirtualUrl( $this->archiveName );
- $status = $this->file->upload( $sourceUrl, $this->params['comment'], $this->params['comment'], 0, false, false, $this->getUser() );
+ $status = $this->file->upload(
+ $sourceUrl,
+ $this->params['comment'],
+ $this->params['comment'],
+ 0,
+ false,
+ false,
+ $this->getUser()
+ );
if ( $status->isGood() ) {
$result = array( 'result' => 'Success' );
}
$this->getResult()->addValue( null, $this->getModuleName(), $result );
-
}
/**
ApiBase::PARAM_REQUIRED => true
),
);
-
}
public function getParamDescription() {
public function getExamples() {
return array(
- 'api.php?action=filerevert&filename=Wiki.png&comment=Revert&archivename=20110305152740!Wiki.png&token=+\\'
+ 'api.php?action=filerevert&filename=Wiki.png&comment=Revert&' .
+ 'archivename=20110305152740!Wiki.png&token=123ABC'
=> 'Revert Wiki.png to the version of 20110305152740',
);
}