Merge "(bug 38152) jquery.tablesorter: Use .data() instead of .attr()"
[lhc/web/wiklou.git] / includes / api / ApiFileRevert.php
index 0a21680..7cac0eb 100644 (file)
@@ -132,15 +132,29 @@ class ApiFileRevert extends ApiBase {
        }
 
        public function getParamDescription() {
-               $params = array(
-                       'filename' => 'Target filename',
+               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',
                );
+       }
 
-               return $params;
-
+       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() {
@@ -171,8 +185,8 @@ class ApiFileRevert extends ApiBase {
 
        public function getExamples() {
                return array(
-                       'Revert Wiki.png to the version of 20110305152740:',
-                       '    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=+\\'
+                               => 'Revert Wiki.png to the version of 20110305152740',
                );
        }