Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -657,6 +657,9 @@ |
658 | 658 | // Validate each triplet and get the store operation... |
659 | 659 | foreach ( $triplets as $triplet ) { |
660 | 660 | list( $srcPath, $dstZone, $dstRel ) = $triplet; |
| 661 | + wfDebug( __METHOD__ |
| 662 | + . "( \$src='$srcPath', \$dstZone='$dstZone', \$dstRel='$dstRel' )\n" |
| 663 | + ); |
661 | 664 | |
662 | 665 | // Resolve destination path |
663 | 666 | $root = $this->getZonePath( $dstZone ); |
— | — | @@ -667,8 +670,7 @@ |
668 | 671 | throw new MWException( 'Validation error in $dstRel' ); |
669 | 672 | } |
670 | 673 | $dstPath = "$root/$dstRel"; |
671 | | - $dstDir = dirname( $dstPath ); |
672 | | - |
| 674 | + $dstDir = dirname( $dstPath ); |
673 | 675 | // Create destination directories for this triplet |
674 | 676 | if ( !$backend->prepare( array( 'dir' => $dstDir ) )->isOK() ) { |
675 | 677 | return $this->newFatal( 'directorycreateerror', $dstDir ); |
— | — | @@ -774,9 +776,9 @@ |
775 | 777 | * @return FileRepoStatus object with the URL in the value. |
776 | 778 | */ |
777 | 779 | public function storeTemp( $originalName, $srcPath ) { |
778 | | - $date = gmdate( "YmdHis" ); |
779 | | - $hashPath = $this->getHashPath( $originalName ); |
780 | | - $dstRel = "{$hashPath}{$date}!{$originalName}"; |
| 780 | + $date = gmdate( "YmdHis" ); |
| 781 | + $hashPath = $this->getHashPath( $originalName ); |
| 782 | + $dstRel = "{$hashPath}{$date}!{$originalName}"; |
781 | 783 | $dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName ); |
782 | 784 | |
783 | 785 | $result = $this->store( $srcPath, 'temp', $dstRel, self::SKIP_LOCKING ); |