r61778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61777‎ | r61778 | r61779 >
Date:06:06, 1 February 2010
Author:tstarling
Status:ok
Tags:
Comment:
For r61355:
* Removed style note, nobody cares
* Fixed indenting and braces
Modified paths:
  • /trunk/phase3/includes/upload/UploadFromChunks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromChunks.php
@@ -19,11 +19,6 @@
2020 const CHUNK = 2;
2121 const DONE = 3;
2222
23 - // STYLE NOTE: Coding guidelines says the 'm' prefix for object
24 - // member variables is discouraged in new code but "stay
25 - // consistent within a class". UploadFromChunks is new, but extends
26 - // UploadBase which has the 'm' prefix. I'm eschewing the prefix for
27 - // member variables of this class.
2823 protected $chunkMode; // INIT, CHUNK, DONE
2924 protected $sessionKey;
3025 protected $comment;
@@ -43,7 +38,8 @@
4439 }
4540
4641 public function initialize( $done, $filename, $sessionKey, $path,
47 - $fileSize, $sessionData ) {
 42+ $fileSize, $sessionData )
 43+ {
4844 $this->initFromSessionKey( $sessionKey, $sessionData );
4945
5046 if ( !$this->sessionKey && !$done ) {
@@ -57,8 +53,8 @@
5854 }
5955
6056 if ( $this->chunkMode == self::CHUNK || $this->chunkMode == self::DONE ) {
61 - $this->mTempPath = $path;
62 - $this->fileSize += $fileSize;
 57+ $this->mTempPath = $path;
 58+ $this->fileSize += $fileSize;
6359 }
6460 }
6561
@@ -99,7 +95,8 @@
10096 $this->sessionKey = $sessionKey;
10197
10298 if ( isset( $sessionData[$this->sessionKey]['version'] )
103 - && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION ) {
 99+ && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION )
 100+ {
104101 $this->comment = $sessionData[$this->sessionKey]['comment'];
105102 $this->pageText = $sessionData[$this->sessionKey]['pageText'];
106103 $this->watch = $sessionData[$this->sessionKey]['watch'];

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61355UploadChunks added from js2 branch. Refactored. Still needs to be...mah04:37, 22 January 2010

Status & tagging log