r56554 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56553‎ | r56554 | r56555 >
Date:19:13, 17 September 2009
Author:dale
Status:ok
Tags:
Comment:
* some clean up and defined append function in other repo types
Modified paths:
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/NullRepo.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -470,13 +470,13 @@
471471 * can accumulate in the temp directory.
472472 *
473473 * @param string $saveName - the destination filename
474 - * @param string $tempName - the source temporary file to save
 474+ * @param string $tempSrc - the source temporary file to save
475475 * @return string - full path the stashed file, or false on failure
476476 * @access private
477477 */
478 - protected function saveTempUploadedFile( $saveName, $tempName ) {
 478+ protected function saveTempUploadedFile( $saveName, $tempSrc ) {
479479 $repo = RepoGroup::singleton()->getLocalRepo();
480 - $status = $repo->storeTemp( $saveName, $tempName );
 480+ $status = $repo->storeTemp( $saveName, $tempSrc );
481481 return $status;
482482 }
483483
Index: trunk/phase3/includes/filerepo/NullRepo.php
@@ -14,6 +14,9 @@
1515 function storeTemp( $originalName, $srcPath ) {
1616 return false;
1717 }
 18+ function append( $srcPath, $toAppendPath ){
 19+ return false;
 20+ }
1821 function publishBatch( $triplets, $flags = 0 ) {
1922 return false;
2023 }
Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -388,6 +388,8 @@
389389 */
390390 abstract function storeTemp( $originalName, $srcPath );
391391
 392+ abstract function append( $srcPath, $toAppendPath );
 393+
392394 /**
393395 * Remove a temporary file or mark it for garbage collection
394396 * @param string $virtualUrl The virtual URL returned by storeTemp
Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -52,6 +52,9 @@
5353 function storeTemp( $originalName, $srcPath ) {
5454 return false;
5555 }
 56+ function append( $srcPath, $toAppendPath ){
 57+ return false;
 58+ }
5659 function publishBatch( $triplets, $flags = 0 ) {
5760 return false;
5861 }

Status & tagging log