X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FOldLocalFile.php;h=23ff304ec510bab4fdd0787609683fe2245e77fd;hb=91a693919e2e704114f2e69e3282577e4c47bb15;hp=f103afabc653f56be942ce240c1f72ef60216d15;hpb=e1bd023aecf5f682e6da6f9a893d4d2c8ac57fe7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/OldLocalFile.php b/includes/filerepo/file/OldLocalFile.php index f103afabc6..23ff304ec5 100644 --- a/includes/filerepo/file/OldLocalFile.php +++ b/includes/filerepo/file/OldLocalFile.php @@ -325,14 +325,14 @@ class OldLocalFile extends LocalFile { * @return string */ function getRel() { - return 'archive/' . $this->getHashPath() . $this->getArchiveName(); + return $this->getArchiveRel( $this->getArchiveName() ); } /** * @return string */ function getUrlRel() { - return 'archive/' . $this->getHashPath() . rawurlencode( $this->getArchiveName() ); + return $this->getArchiveRel( rawurlencode( $this->getArchiveName() ) ); } function upgradeRow() { @@ -406,17 +406,16 @@ class OldLocalFile extends LocalFile { * Upload a file directly into archive. Generally for Special:Import. * * @param string $srcPath File system path of the source file - * @param string $archiveName Full archive name of the file, in the form - * $timestamp!$filename, where $filename must match $this->getName() * @param string $timestamp * @param string $comment * @param User $user * @return Status */ - function uploadOld( $srcPath, $archiveName, $timestamp, $comment, $user ) { + public function uploadOld( $srcPath, $timestamp, $comment, $user ) { $this->lock(); - $dstRel = 'archive/' . $this->getHashPath() . $archiveName; + $archiveName = $this->getArchiveName(); + $dstRel = $this->getArchiveRel( $archiveName ); $status = $this->publishTo( $srcPath, $dstRel ); if ( $status->isGood() ) {