More documentation
authorSam Reed <reedy@users.mediawiki.org>
Mon, 7 Mar 2011 14:59:41 +0000 (14:59 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 7 Mar 2011 14:59:41 +0000 (14:59 +0000)
Remove trailing whitespace

includes/api/ApiFileRevert.php
includes/api/ApiMove.php
includes/filerepo/LocalRepo.php

index 9ae309a..3a183a4 100644 (file)
@@ -39,7 +39,7 @@ class ApiFileRevert extends ApiBase {
         */
        protected $file;
        protected $archiveName;
-       
+
        protected $params;
 
        public function __construct( $main, $action ) {
@@ -54,11 +54,11 @@ class ApiFileRevert extends ApiBase {
 
                $this->params = $this->extractRequestParams();
                $this->validateParameters();
-               
+
 
                $sourceUrl = $this->file->getArchiveVirtualUrl( $this->archiveName );
                $status = $this->file->upload( $sourceUrl, $this->params['comment'], $this->params['comment'] );
-               
+
                if ( $status->isGood() ) {
                        $result = array( 'result' => 'Success' );
                } else {
@@ -67,7 +67,7 @@ class ApiFileRevert extends ApiBase {
                                'errors' => $this->getResult()->convertStatusToArray( $status ),
                        );
                }
-                       
+
                $this->getResult()->addValue( null, $this->getModuleName(), $result );  
 
        }
@@ -88,7 +88,7 @@ class ApiFileRevert extends ApiBase {
                        }
                }
        }
-       
+
        /**
         * Validate the user parameters and set $this->archiveName and $this->file.
         * Throws an error if validation fails
@@ -104,7 +104,7 @@ class ApiFileRevert extends ApiBase {
                if ( !$this->file->exists() ) {
                        $this->dieUsageMsg( array( 'notanarticle' ) );
                }
-               
+
                // Check if the archivename is valid for this file
                $this->archiveName = $this->params['archivename'];
                $oldFile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $this->archiveName );
@@ -112,8 +112,6 @@ class ApiFileRevert extends ApiBase {
                        $this->dieUsageMsg( array( 'filerevert-badversion' ) );
                }
        }
-       
-       
 
        public function mustBePosted() {
                return true;
index 28ad025..3132de6 100644 (file)
@@ -135,6 +135,13 @@ class ApiMove extends ApiBase {
                $this->getResult()->addValue( null, $this->getModuleName(), $r );
        }
 
+       /**
+        * @param Title $fromTitle
+        * @param Title $toTitle
+        * @param  $reason
+        * @param  $noredirect
+        * @return array
+        */
        public function moveSubpages( $fromTitle, $toTitle, $reason, $noredirect ) {
                $retval = array();
                $success = $fromTitle->moveSubpages( $toTitle, true, $reason, !$noredirect );
index bbd99aa..e72f32b 100644 (file)
@@ -18,6 +18,11 @@ class LocalRepo extends FSRepo {
        var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
        var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
 
+       /**
+        * @throws MWException
+        * @param  $row
+        * @return File
+        */
        function newFileFromRow( $row ) {
                if ( isset( $row->img_name ) ) {
                        return call_user_func( $this->fileFromRowFactory, $row, $this );