From 5a398cdab5c2c8c9f77bad60b1a7c532f0e39632 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sat, 19 Feb 2005 08:19:21 +0000 Subject: [PATCH] correct image path hashing --- includes/Image.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/Image.php b/includes/Image.php index a99c2cafee..fac3364199 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -583,10 +583,8 @@ class Image $dir = $fromSharedRepository ? $wgSharedUploadDirectory : $wgUploadDirectory; - $ishashed = $fromSharedRepository ? $wgHashedSharedUploadDirectory : - $wgHashedUploadDirectory; $name = $this->name; - $fullpath = $dir . wfGetHashPath($name) . $name; + $fullpath = $dir . wfGetHashPath($name, $fromSharedRepository) . $name; return $fullpath; } @@ -675,7 +673,7 @@ function wfGetHashPath ( $dbkey, $fromSharedDirectory = false ) { global $wgHashedSharedUploadDirectory, $wgSharedUploadDirectory; $ishashed = $fromSharedDirectory ? $wgHashedSharedUploadDirectory : - $wgSharedUploadDirectory; + $wgHashedUploadDirectory; if($ishashed) { $hash = md5($dbkey); return '/' . $hash{0} . '/' . substr( $hash, 0, 2 ) . '/'; -- 2.20.1