Index: trunk/phase3/includes/upload/UploadFromChunks.php |
— | — | @@ -19,11 +19,6 @@ |
20 | 20 | const CHUNK = 2; |
21 | 21 | const DONE = 3; |
22 | 22 | |
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. |
28 | 23 | protected $chunkMode; // INIT, CHUNK, DONE |
29 | 24 | protected $sessionKey; |
30 | 25 | protected $comment; |
— | — | @@ -43,7 +38,8 @@ |
44 | 39 | } |
45 | 40 | |
46 | 41 | public function initialize( $done, $filename, $sessionKey, $path, |
47 | | - $fileSize, $sessionData ) { |
| 42 | + $fileSize, $sessionData ) |
| 43 | + { |
48 | 44 | $this->initFromSessionKey( $sessionKey, $sessionData ); |
49 | 45 | |
50 | 46 | if ( !$this->sessionKey && !$done ) { |
— | — | @@ -57,8 +53,8 @@ |
58 | 54 | } |
59 | 55 | |
60 | 56 | 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; |
63 | 59 | } |
64 | 60 | } |
65 | 61 | |
— | — | @@ -99,7 +95,8 @@ |
100 | 96 | $this->sessionKey = $sessionKey; |
101 | 97 | |
102 | 98 | if ( isset( $sessionData[$this->sessionKey]['version'] ) |
103 | | - && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION ) { |
| 99 | + && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION ) |
| 100 | + { |
104 | 101 | $this->comment = $sessionData[$this->sessionKey]['comment']; |
105 | 102 | $this->pageText = $sessionData[$this->sessionKey]['pageText']; |
106 | 103 | $this->watch = $sessionData[$this->sessionKey]['watch']; |