Index: trunk/phase3/includes/upload/UploadFromStash.php |
— | — | @@ -25,24 +25,24 @@ |
26 | 26 | } |
27 | 27 | |
28 | 28 | public function initialize( $name, $sessionKey, $sessionData ) { |
29 | | - /** |
30 | | - * Confirming a temporarily stashed upload. |
31 | | - * We don't want path names to be forged, so we keep |
32 | | - * them in the session on the server and just give |
33 | | - * an opaque key to the user agent. |
34 | | - */ |
| 29 | + /** |
| 30 | + * Confirming a temporarily stashed upload. |
| 31 | + * We don't want path names to be forged, so we keep |
| 32 | + * them in the session on the server and just give |
| 33 | + * an opaque key to the user agent. |
| 34 | + */ |
35 | 35 | |
36 | | - $this->initializePathInfo( $name, |
37 | | - $this->getRealPath ( $sessionData['mTempPath'] ), |
38 | | - $sessionData['mFileSize'], |
39 | | - false |
40 | | - ); |
41 | | - |
42 | | - $this->mSessionKey = $sessionKey; |
43 | | - $this->mVirtualTempPath = $sessionData['mTempPath']; |
44 | | - $this->mFileProps = $sessionData['mFileProps']; |
45 | | - $this->mSourceType = isset( $sessionData['mSourceType'] ) ? |
46 | | - $sessionData['mSourceType'] : null; |
| 36 | + $this->initializePathInfo( $name, |
| 37 | + $this->getRealPath ( $sessionData['mTempPath'] ), |
| 38 | + $sessionData['mFileSize'], |
| 39 | + false |
| 40 | + ); |
| 41 | + |
| 42 | + $this->mSessionKey = $sessionKey; |
| 43 | + $this->mVirtualTempPath = $sessionData['mTempPath']; |
| 44 | + $this->mFileProps = $sessionData['mFileProps']; |
| 45 | + $this->mSourceType = isset( $sessionData['mSourceType'] ) ? |
| 46 | + $sessionData['mSourceType'] : null; |
47 | 47 | } |
48 | 48 | |
49 | 49 | public function initializeFromRequest( &$request ) { |
Index: trunk/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -187,7 +187,13 @@ |
188 | 188 | return parent::performUpload( $comment, $pageText, $watch, $user ); |
189 | 189 | } |
190 | 190 | |
191 | | - |
| 191 | + /** |
| 192 | + * @param $comment |
| 193 | + * @param $pageText |
| 194 | + * @param $watch |
| 195 | + * @param $user User |
| 196 | + * @return |
| 197 | + */ |
192 | 198 | protected function insertJob( $comment, $pageText, $watch, $user ) { |
193 | 199 | $sessionKey = $this->stashSession(); |
194 | 200 | $job = new UploadFromUrlJob( $this->getTitle(), array( |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -1102,7 +1102,7 @@ |
1103 | 1103 | * - File exists with normalized extension |
1104 | 1104 | * - The file looks like a thumbnail and the original exists |
1105 | 1105 | * |
1106 | | - * @param $file The File object to check |
| 1106 | + * @param $file File The File object to check |
1107 | 1107 | * @return mixed False if the file does not exists, else an array |
1108 | 1108 | */ |
1109 | 1109 | public static function getExistsWarning( $file ) { |
Index: trunk/phase3/includes/upload/UploadStash.php |
— | — | @@ -186,14 +186,12 @@ |
187 | 187 | return true; |
188 | 188 | } |
189 | 189 | |
190 | | - |
191 | 190 | /** |
192 | 191 | * List all files in the stash. |
193 | 192 | */ |
194 | 193 | public function listFiles() { |
195 | 194 | return array_keys( $_SESSION[UploadBase::SESSION_KEYNAME] ); |
196 | 195 | } |
197 | | - |
198 | 196 | |
199 | 197 | /** |
200 | 198 | * Find or guess extension -- ensuring that our extension matches our mime type. |
— | — | @@ -269,8 +267,6 @@ |
270 | 268 | throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' ); |
271 | 269 | } |
272 | 270 | |
273 | | - |
274 | | - |
275 | 271 | parent::__construct( false, $repo, $path, false ); |
276 | 272 | |
277 | 273 | $this->name = basename( $this->path ); |
— | — | @@ -346,7 +342,6 @@ |
347 | 343 | return SpecialPage::getTitleFor( 'UploadStash', $subPage )->getLocalURL(); |
348 | 344 | } |
349 | 345 | |
350 | | - |
351 | 346 | /** |
352 | 347 | * Get a URL to access the thumbnail |
353 | 348 | * This is required because the model of how files work requires that |
— | — | @@ -397,7 +392,6 @@ |
398 | 393 | return $this->getUrl(); |
399 | 394 | } |
400 | 395 | |
401 | | - |
402 | 396 | /** |
403 | 397 | * Getter for session key (the session-unique id by which this file's location & metadata is stored in the session) |
404 | 398 | * |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -157,6 +157,7 @@ |
158 | 158 | |
159 | 159 | /** |
160 | 160 | * Return the associated title object |
| 161 | + * @return Title |
161 | 162 | */ |
162 | 163 | public function getTitle() { return $this->title; } |
163 | 164 | |
— | — | @@ -269,14 +270,14 @@ |
270 | 271 | /** |
271 | 272 | * Return true if the file is vectorized |
272 | 273 | */ |
273 | | - public function isVectorized() { |
274 | | - $handler = $this->getHandler(); |
275 | | - if ( $handler ) { |
276 | | - return $handler->isVectorized( $this ); |
277 | | - } else { |
278 | | - return false; |
279 | | - } |
280 | | - } |
| 274 | + public function isVectorized() { |
| 275 | + $handler = $this->getHandler(); |
| 276 | + if ( $handler ) { |
| 277 | + return $handler->isVectorized( $this ); |
| 278 | + } else { |
| 279 | + return false; |
| 280 | + } |
| 281 | + } |
281 | 282 | |
282 | 283 | |
283 | 284 | /** |