X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFileRevert.php;h=5517ee0884a17d2309f49e3d4d1ed165098681fa;hb=855f4cc0bf7e769ae947597ca5ea5007965f5bad;hp=f518e172e3427fb24f5b722dee68fb5f12a6c98a;hpb=38d59dd21347dc5167fbef94a0558f6bbdcd4195;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFileRevert.php b/includes/api/ApiFileRevert.php index f518e172e3..5517ee0884 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', ); } }