From 3a16bec925fb1947eee5793c5bcb21e982951c9d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 16 Aug 2012 20:00:24 -0700 Subject: [PATCH] [FileRepo] Use the backend sha1 function for getting sha1s. Change-Id: I1ad1e25c3c9edfe132416d66f37aa284a448c503 --- includes/filerepo/FileRepo.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 32ef5a9885..1563a58658 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1388,18 +1388,14 @@ class FileRepo { } /** - * Get the sha1 of a file with a given virtual URL/storage path + * Get the sha1 (base 36) of a file with a given virtual URL/storage path * * @param $virtualUrl string * @return string|bool */ public function getFileSha1( $virtualUrl ) { $path = $this->resolveToStoragePath( $virtualUrl ); - $tmpFile = $this->backend->getLocalReference( array( 'src' => $path ) ); - if ( !$tmpFile ) { - return false; - } - return $tmpFile->getSha1Base36(); + return $this->backend->getFileSha1Base36( array( 'src' => $path ) ); } /** -- 2.20.1