From b46d873bf5c22dd4b3888e6c948f8c76b653950b Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Wed, 8 Feb 2012 10:00:02 +0000 Subject: [PATCH] debug statement for FileRepo::storeBatch() also nicely align some variable assignements --- includes/filerepo/FileRepo.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index c4fee087d3..828bc921d0 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -657,6 +657,9 @@ class FileRepo { // Validate each triplet and get the store operation... foreach ( $triplets as $triplet ) { list( $srcPath, $dstZone, $dstRel ) = $triplet; + wfDebug( __METHOD__ + . "( \$src='$srcPath', \$dstZone='$dstZone', \$dstRel='$dstRel' )\n" + ); // Resolve destination path $root = $this->getZonePath( $dstZone ); @@ -667,8 +670,7 @@ class FileRepo { throw new MWException( 'Validation error in $dstRel' ); } $dstPath = "$root/$dstRel"; - $dstDir = dirname( $dstPath ); - + $dstDir = dirname( $dstPath ); // Create destination directories for this triplet if ( !$backend->prepare( array( 'dir' => $dstDir ) )->isOK() ) { return $this->newFatal( 'directorycreateerror', $dstDir ); @@ -774,9 +776,9 @@ class FileRepo { * @return FileRepoStatus object with the URL in the value. */ public function storeTemp( $originalName, $srcPath ) { - $date = gmdate( "YmdHis" ); - $hashPath = $this->getHashPath( $originalName ); - $dstRel = "{$hashPath}{$date}!{$originalName}"; + $date = gmdate( "YmdHis" ); + $hashPath = $this->getHashPath( $originalName ); + $dstRel = "{$hashPath}{$date}!{$originalName}"; $dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName ); $result = $this->store( $srcPath, 'temp', $dstRel, self::SKIP_LOCKING ); -- 2.20.1