From 8c819ac2e86c41bd2dbc2a9f8dac7f63de121780 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 20 Nov 2012 14:37:58 -0800 Subject: [PATCH] [FileRepo] Quashed melodious 4-tuples into silence. Change-Id: I55c6ddd5d2e8999578ca45f523e99ab6cd4e9d52 --- includes/filerepo/FileRepo.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 91fbaab7d4..52015520c0 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1061,14 +1061,14 @@ class FileRepo { /** * Publish a batch of files * - * @param $triplets Array: (source, dest, archive) triplets or - * (source, dest, archive, options) quartets as per publish(). + * @param $ntuples Array: (source, dest, archive) triplets or + * (source, dest, archive, options) 4-tuples as per publish(). * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate * that the source files should be deleted if possible * @throws MWException * @return FileRepoStatus */ - public function publishBatch( array $triplets, $flags = 0 ) { + public function publishBatch( array $ntuples, $flags = 0 ) { $this->assertWritableRepo(); // fail out if read-only $backend = $this->backend; // convenience @@ -1083,9 +1083,9 @@ class FileRepo { $operations = array(); $sourceFSFilesToDelete = array(); // cleanup for disk source files // Validate each triplet and get the store operation... - foreach ( $triplets as $i => $triplet ) { - list( $srcPath, $dstRel, $archiveRel ) = $triplet; - $options = isset( $triplet[3] ) ? $triplet[3] : array(); + foreach ( $ntuples as $i => $ntuple ) { + list( $srcPath, $dstRel, $archiveRel ) = $ntuple; + $options = isset( $ntuple[3] ) ? $ntuple[3] : array(); // Resolve source to a storage path if virtual $srcPath = $this->resolveToStoragePath( $srcPath ); if ( !$this->validateFilename( $dstRel ) ) { @@ -1161,8 +1161,8 @@ class FileRepo { // Execute the operations for each triplet $status->merge( $backend->doOperations( $operations ) ); // Find out which files were archived... - foreach ( $triplets as $i => $triplet ) { - list( $srcPath, $dstRel, $archiveRel ) = $triplet; + foreach ( $ntuples as $i => $ntuple ) { + list( $srcPath, $dstRel, $archiveRel ) = $ntuple; $archivePath = $this->getZonePath( 'public' ) . "/$archiveRel"; if ( $this->fileExists( $archivePath ) ) { $status->value[$i] = 'archived'; -- 2.20.1