http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93725

Revision: 93725
Author:   j
Date:     2011-08-02 11:01:01 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
use tabs. for consistant whitespaces

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiUpload.php

Modified: trunk/phase3/includes/api/ApiUpload.php
===================================================================
--- trunk/phase3/includes/api/ApiUpload.php     2011-08-02 10:34:23 UTC (rev 
93724)
+++ trunk/phase3/includes/api/ApiUpload.php     2011-08-02 11:01:01 UTC (rev 
93725)
@@ -91,9 +91,9 @@
                        if( $this->mParams['filesize'] > $maxSize ) {
                                $this->dieUsage( 'The file you submitted was 
too large', 'file-too-large' );
                        }
-        } else {
+               } else {
                        $this->verifyUpload();
-        }
+               }
 
 
                // Check if the user has the rights to modify or overwrite the 
requested title
@@ -122,25 +122,25 @@
                                $result['warnings']['stashfailed'] = 
$e->getMessage();
                        }
                } elseif ( $this->mParams['chunk'] ) {
-                   $result['result'] = 'Continue';
+                       $result['result'] = 'Continue';
                        $chunk = $request->getFileTempName( 'chunk' );
                        $chunkSize = $request->getFileSize( 'chunk' );
-            if ($this->mParams['offset'] == 0) {
+                       if ($this->mParams['offset'] == 0) {
                                $result['filekey'] = $this->performStash();
-            } else {
-                $status = $this->mUpload->appendChunk($chunk, $chunkSize,
-                                                      
$this->mParams['offset']);
-                       if ( !$status->isGood() ) {
-                                   $this->dieUsage( $status->getWikiText(), 
'stashfailed' );
-                } else {
-                    $result['filekey'] = $this->mParams['filekey'];
-                    if($this->mParams['offset'] + $chunkSize == 
$this->mParams['filesize']) {
-                        $this->mUpload->finalizeFile();
-                        $result['result'] = 'Done';
-                    }
-                }
-            }
-            $result['offset'] = $this->mParams['offset'] + $chunkSize;
+                       } else {
+                               $status = $this->mUpload->appendChunk($chunk, 
$chunkSize,
+                                                                               
                          $this->mParams['offset']);
+                               if ( !$status->isGood() ) {
+                                       $this->dieUsage( 
$status->getWikiText(), 'stashfailed' );
+                               } else {
+                                       $result['filekey'] = 
$this->mParams['filekey'];
+                                       if($this->mParams['offset'] + 
$chunkSize == $this->mParams['filesize']) {
+                                               $this->mUpload->finalizeFile();
+                                               $result['result'] = 'Done';
+                                       }
+                               }
+                       }
+                       $result['offset'] = $this->mParams['offset'] + 
$chunkSize;
                } elseif ( $this->mParams['stash'] ) {
                        // Some uploads can request they be stashed, so as not 
to publish them immediately.
                        // In this case, a failure to stash ought to be fatal


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to