Call method with the same name it's defined with
[lhc/web/wiklou.git] / includes / api / ApiFileRevert.php
index 1e463e5..2a7f46d 100644 (file)
@@ -37,10 +37,6 @@ class ApiFileRevert extends ApiBase {
 
        protected $params;
 
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
        public function execute() {
                $this->params = $this->extractRequestParams();
                // Extract the file and archiveName from the request parameters
@@ -62,7 +58,6 @@ class ApiFileRevert extends ApiBase {
                }
 
                $this->getResult()->addValue( null, $this->getModuleName(), $result );
-
        }
 
        /**
@@ -73,8 +68,8 @@ class ApiFileRevert extends ApiBase {
        protected function checkPermissions( $user ) {
                $title = $this->file->getTitle();
                $permissionErrors = array_merge(
-                       $title->getUserPermissionsErrors( 'edit' , $user ),
-                       $title->getUserPermissionsErrors( 'upload' , $user )
+                       $title->getUserPermissionsErrors( 'edit', $user ),
+                       $title->getUserPermissionsErrors( 'upload', $user )
                );
 
                if ( $permissionErrors ) {
@@ -134,7 +129,6 @@ class ApiFileRevert extends ApiBase {
                                ApiBase::PARAM_REQUIRED => true
                        ),
                );
-
        }
 
        public function getParamDescription() {
@@ -191,7 +185,7 @@ class ApiFileRevert extends ApiBase {
 
        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',
                );
        }