diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/api/ApiFileRevert.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/api/ApiFileRevert.php')
-rw-r--r-- | includes/api/ApiFileRevert.php | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/includes/api/ApiFileRevert.php b/includes/api/ApiFileRevert.php index f518e172..5517ee08 100644 --- a/includes/api/ApiFileRevert.php +++ b/includes/api/ApiFileRevert.php @@ -61,7 +61,7 @@ class ApiFileRevert extends ApiBase { } else { $result = array( 'result' => 'Failure', - 'errors' => $this->getResult()->convertStatusToArray( $status ), + 'errors' => $this->getErrorFormatter()->arrayFromStatus( $status ), ); } @@ -135,29 +135,15 @@ class ApiFileRevert extends ApiBase { ); } - public function getParamDescription() { - return array( - 'filename' => 'Target filename without the File: prefix', - 'comment' => 'Upload comment', - 'archivename' => 'Archive name of the revision to revert to', - ); - } - - public function getDescription() { - return array( - 'Revert a file to an old version.' - ); - } - public function needsToken() { return 'csrf'; } - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=filerevert&filename=Wiki.png&comment=Revert&' . + 'action=filerevert&filename=Wiki.png&comment=Revert&' . 'archivename=20110305152740!Wiki.png&token=123ABC' - => 'Revert Wiki.png to the version of 20110305152740', + => 'apihelp-filerevert-example-revert', ); } } |