From 14863b9aa5071eb76fa73379f6e735e31ad3ffdb Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 20 Dec 2011 19:25:23 +0000 Subject: [PATCH] Cleaned up some references to FSRepo in code and comments. This should have no noticeable functional changes. --- includes/DefaultSettings.php | 3 ++- includes/Setup.php | 2 +- includes/filerepo/FileRepo.php | 2 +- includes/filerepo/file/File.php | 2 +- includes/filerepo/file/LocalFile.php | 10 +++++----- includes/filerepo/file/UnregisteredLocalFile.php | 4 ++-- includes/upload/UploadStash.php | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c7c6d52e0d..0b7d4d3689 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -299,7 +299,8 @@ $wgImgAuthPublicTest = true; * * Properties required for all repos: * - class The class name for the repository. May come from the core or an extension. - * The core repository classes are LocalRepo, ForeignDBRepo, FSRepo. + * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo. + * FSRepo is also supported for backwards compatibility. * * - name A unique name for the repository (but $wgLocalFileRepo should be 'local'). * diff --git a/includes/Setup.php b/includes/Setup.php index adbfe57a7c..d842e7abfb 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -176,7 +176,7 @@ if ( $wgUseSharedUploads ) { ); } else { $wgForeignFileRepos[] = array( - 'class' => 'FSRepo', + 'class' => 'FileRepo', 'name' => 'shared', 'directory' => $wgSharedUploadDirectory, 'url' => $wgSharedUploadPath, diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 9142065235..ec0711ec53 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1047,7 +1047,7 @@ class FileRepo { * If no valid deletion archive is configured, this may either delete the * file or throw an exception, depending on the preference of the repository. * - * The overwrite policy is determined by the repository -- currently FSRepo + * The overwrite policy is determined by the repository -- currently LocalRepo * assumes a naming scheme in the deleted zone based on content hash, as * opposed to the public zone which is assumed to be unique. * diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 05f1e2c3d4..fb80861b97 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -760,7 +760,7 @@ abstract class File { wfDebug( __METHOD__ . " transformation deferred." ); // XXX: Pass in the storage path even though we are not rendering anything // and the path is supposed to be an FS path. This is due to getScalerType() - // getting called on the path and clobbering the $thumb->getUrl() if it's false. + // getting called on the path and clobbering $thumb->getUrl() if it's false. return $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); } diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 69dc0297c2..3a223ae8ea 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1730,7 +1730,7 @@ class LocalFileDeleteBatch { $files[$src] = $this->file->repo->getVirtualUrl( 'public' ) . '/' . rawurlencode( $src ); } - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY ); + $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY ); foreach ( $batch as $batchItem ) { if ( $result[$batchItem[0]] ) { @@ -2018,7 +2018,7 @@ class LocalFileRestoreBatch { foreach ( $triplets as $file ) $files[$file[0]] = $file[0]; - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY ); + $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY ); foreach ( $triplets as $file ) { if ( $result[$file[0]] ) { @@ -2041,7 +2041,7 @@ class LocalFileRestoreBatch { rawurlencode( $repo->getDeletedHashPath( $file ) . $file ); } - $result = $repo->fileExistsBatch( $files, FSRepo::FILES_ONLY ); + $result = $repo->fileExistsBatch( $files, FileRepo::FILES_ONLY ); foreach ( $batch as $file ) { if ( $result[$file] ) { @@ -2264,7 +2264,7 @@ class LocalFileMoveBatch { } /** - * Generate triplets for FSRepo::storeBatch(). + * Generate triplets for FileRepo::storeBatch(). */ function getMoveTriplets() { $moves = array_merge( array( $this->cur ), $this->olds ); @@ -2290,7 +2290,7 @@ class LocalFileMoveBatch { $files[$file[0]] = $file[0]; } - $result = $this->file->repo->fileExistsBatch( $files, FSRepo::FILES_ONLY ); + $result = $this->file->repo->fileExistsBatch( $files, FileRepo::FILES_ONLY ); $filteredTriplets = array(); foreach ( $triplets as $file ) { diff --git a/includes/filerepo/file/UnregisteredLocalFile.php b/includes/filerepo/file/UnregisteredLocalFile.php index 14987b7af6..65a18a5062 100644 --- a/includes/filerepo/file/UnregisteredLocalFile.php +++ b/includes/filerepo/file/UnregisteredLocalFile.php @@ -8,7 +8,7 @@ /** * A file object referring to either a standalone local file, or a file in a - * local repository with no database, for example an FSRepo repository. + * local repository with no database, for example an FileRepo repository. * * Read-only. * @@ -50,7 +50,7 @@ class UnregisteredLocalFile extends File { * * @throws MWException * @param $title Title|false - * @param $repo FSRepo + * @param $repo FileRepo * @param $path string * @param $mime string */ diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 6aaa1fe04a..19114ab8ee 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -472,7 +472,7 @@ class UploadStashFile extends UnregisteredLocalFile { * A LocalFile wrapper around a file that has been temporarily stashed, so we can do things like create thumbnails for it * Arguably UnregisteredLocalFile should be handling its own file repo but that class is a bit retarded currently * - * @param $repo FSRepo: repository where we should find the path + * @param $repo FileRepo: repository where we should find the path * @param $path String: path to file * @param $key String: key to store the path and any stashed data under * @throws UploadStashBadPathException -- 2.20.1