r107788 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107787‎ | r107788 | r107789 >
Date:23:28, 1 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Tidyup outputChunk added in r104687, remove/update documentation

Don't use undefined $path variable on line 265
Modified paths:
  • /trunk/phase3/includes/upload/UploadFromChunks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromChunks.php
@@ -241,15 +241,14 @@
242242 /**
243243 * Output the chunk to disk
244244 *
245 - * @param $chunk
246 - * @param unknown_type $path
 245+ * @param $chunkPath string
247246 */
248247 private function outputChunk( $chunkPath ){
249248 // Key is fileKey + chunk index
250249 $fileKey = $this->getChunkFileKey();
251250
252251 // Store the chunk per its indexed fileKey:
253 - $hashPath = $this->repo->getHashPath( $fileKey );
 252+ $hashPath = $this->repo->getHashPath( $fileKey );
254253 $storeStatus = $this->repo->store( $chunkPath, 'temp', "$hashPath$fileKey" );
255254
256255 // Check for error in stashing the chunk:
@@ -263,7 +262,7 @@
264263 $error = array( 'unknown', 'no error recorded' );
265264 }
266265 }
267 - throw new UploadChunkFileException( "error storing file in '$path': " . implode( '; ', $error ) );
 266+ throw new UploadChunkFileException( "error storing file in '$chunkPath': " . implode( '; ', $error ) );
268267 }
269268 return $storeStatus;
270269 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104687Use database to track uploaded chunks and concatenate at the end....j14:56, 30 November 2011

Status & tagging log