Merge "fixed php doc in ApiBase"
[lhc/web/wiklou.git] / includes / api / ApiUpload.php
index deeb1c1..719032f 100644 (file)
@@ -81,7 +81,7 @@ class ApiUpload extends ApiBase {
 
                // Check if the uploaded file is sane
                if ( $this->mParams['chunk'] ) {
-                       $maxSize = $this->mUpload->getMaxUploadSize( );
+                       $maxSize = $this->mUpload->getMaxUploadSize();
                        if( $this->mParams['filesize'] > $maxSize ) {
                                $this->dieUsage( 'The file you submitted was too large', 'file-too-large' );
                        }
@@ -440,13 +440,13 @@ class ApiUpload extends ApiBase {
        /**
         * Performs file verification, dies on error.
         */
-       protected function verifyUpload( ) {
-               $verification = $this->mUpload->verifyUpload( );
+       protected function verifyUpload() {
+               $verification = $this->mUpload->verifyUpload();
                if ( $verification['status'] === UploadBase::OK ) {
                        return;
-               } else {
-                       return $this->checkVerification( $verification );
                }
+
+               $this->checkVerification( $verification );
        }
 
        /**
@@ -455,7 +455,7 @@ class ApiUpload extends ApiBase {
        protected function checkVerification( array $verification ) {
                global $wgFileExtensions;
 
-               // TODO: Move them to ApiBase's message map
+               // @todo Move them to ApiBase's message map
                switch( $verification['status'] ) {
                        // Recoverable errors
                        case UploadBase::MIN_LENGTH_PARTNAME: