From: Aaron Schulz Date: Fri, 17 Aug 2012 03:00:24 +0000 (-0700) Subject: [FileRepo] Use the backend sha1 function for getting sha1s. X-Git-Tag: 1.31.0-rc.0~22700^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=3a16bec925fb1947eee5793c5bcb21e982951c9d;p=lhc%2Fweb%2Fwiklou.git [FileRepo] Use the backend sha1 function for getting sha1s. Change-Id: I1ad1e25c3c9edfe132416d66f37aa284a448c503 --- 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 ) ); } /**