r106841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106840‎ | r106841 | r106842 >
Date:19:25, 20 December 2011
Author:aaron
Status:ok
Tags:
Comment:
Cleaned up some references to FSRepo in code and comments. This should have no noticeable functional changes.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/File.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/LocalFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/UnregisteredLocalFile.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadStash.php
@@ -472,7 +472,7 @@
473473 * A LocalFile wrapper around a file that has been temporarily stashed, so we can do things like create thumbnails for it
474474 * Arguably UnregisteredLocalFile should be handling its own file repo but that class is a bit retarded currently
475475 *
476 - * @param $repo FSRepo: repository where we should find the path
 476+ * @param $repo FileRepo: repository where we should find the path
477477 * @param $path String: path to file
478478 * @param $key String: key to store the path and any stashed data under
479479 * @throws UploadStashBadPathException
Index: trunk/phase3/includes/Setup.php
@@ -176,7 +176,7 @@
177177 );
178178 } else {
179179 $wgForeignFileRepos[] = array(
180 - 'class' => 'FSRepo',
 180+ 'class' => 'FileRepo',
181181 'name' => 'shared',
182182 'directory' => $wgSharedUploadDirectory,
183183 'url' => $wgSharedUploadPath,
Index: trunk/phase3/includes/filerepo/file/LocalFile.php
@@ -1730,7 +1730,7 @@
17311731 $files[$src] = $this->file->repo->getVirtualUrl( 'public' ) . '/' . rawurlencode( $src );
17321732 }
17331733
1734 - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY );
 1734+ $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY );
17351735
17361736 foreach ( $batch as $batchItem ) {
17371737 if ( $result[$batchItem[0]] ) {
@@ -2018,7 +2018,7 @@
20192019 foreach ( $triplets as $file )
20202020 $files[$file[0]] = $file[0];
20212021
2022 - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY );
 2022+ $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY );
20232023
20242024 foreach ( $triplets as $file ) {
20252025 if ( $result[$file[0]] ) {
@@ -2041,7 +2041,7 @@
20422042 rawurlencode( $repo->getDeletedHashPath( $file ) . $file );
20432043 }
20442044
2045 - $result = $repo->fileExistsBatch( $files, FSRepo::FILES_ONLY );
 2045+ $result = $repo->fileExistsBatch( $files, FileRepo::FILES_ONLY );
20462046
20472047 foreach ( $batch as $file ) {
20482048 if ( $result[$file] ) {
@@ -2264,7 +2264,7 @@
22652265 }
22662266
22672267 /**
2268 - * Generate triplets for FSRepo::storeBatch().
 2268+ * Generate triplets for FileRepo::storeBatch().
22692269 */
22702270 function getMoveTriplets() {
22712271 $moves = array_merge( array( $this->cur ), $this->olds );
@@ -2290,7 +2290,7 @@
22912291 $files[$file[0]] = $file[0];
22922292 }
22932293
2294 - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY );
 2294+ $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY );
22952295 $filteredTriplets = array();
22962296
22972297 foreach ( $triplets as $file ) {
Index: trunk/phase3/includes/filerepo/file/UnregisteredLocalFile.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * A file object referring to either a standalone local file, or a file in a
12 - * local repository with no database, for example an FSRepo repository.
 12+ * local repository with no database, for example an FileRepo repository.
1313 *
1414 * Read-only.
1515 *
@@ -50,7 +50,7 @@
5151 *
5252 * @throws MWException
5353 * @param $title Title|false
54 - * @param $repo FSRepo
 54+ * @param $repo FileRepo
5555 * @param $path string
5656 * @param $mime string
5757 */
Index: trunk/phase3/includes/filerepo/file/File.php
@@ -760,7 +760,7 @@
761761 wfDebug( __METHOD__ . " transformation deferred." );
762762 // XXX: Pass in the storage path even though we are not rendering anything
763763 // and the path is supposed to be an FS path. This is due to getScalerType()
764 - // getting called on the path and clobbering the $thumb->getUrl() if it's false.
 764+ // getting called on the path and clobbering $thumb->getUrl() if it's false.
765765 return $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
766766 }
767767
Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -1047,7 +1047,7 @@
10481048 * If no valid deletion archive is configured, this may either delete the
10491049 * file or throw an exception, depending on the preference of the repository.
10501050 *
1051 - * The overwrite policy is determined by the repository -- currently FSRepo
 1051+ * The overwrite policy is determined by the repository -- currently LocalRepo
10521052 * assumes a naming scheme in the deleted zone based on content hash, as
10531053 * opposed to the public zone which is assumed to be unique.
10541054 *
Index: trunk/phase3/includes/DefaultSettings.php
@@ -299,7 +299,8 @@
300300 *
301301 * Properties required for all repos:
302302 * - class The class name for the repository. May come from the core or an extension.
303 - * The core repository classes are LocalRepo, ForeignDBRepo, FSRepo.
 303+ * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
 304+ * FSRepo is also supported for backwards compatibility.
304305 *
305306 * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
306307 *

Status & tagging log