- 'token' => array(
- ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => true
- ),
- );
- }
-
- public function getParamDescription() {
- return array(
- 'filename' => 'Target filename without the File: prefix',
- 'token' => 'Edit token. You can get one of these through prop=info',
- 'comment' => 'Upload comment',
- 'archivename' => 'Archive name of the revision to revert to',
- );
- }
-
- public function getResultProperties() {
- return array(
- '' => array(
- 'result' => array(
- ApiBase::PROP_TYPE => array(
- 'Success',
- 'Failure'
- )
- ),
- 'errors' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- )
- )
- );
- }
-
- public function getDescription() {
- return array(
- 'Revert a file to an old version.'
- );
- }
-
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(),
- array(
- array( 'mustbeloggedin', 'upload' ),
- array( 'badaccess-groups' ),
- array( 'invalidtitle', 'title' ),
- array( 'notanarticle' ),
- array( 'filerevert-badversion' ),
- )