From 6dff4efc614c5990f4a8bf6d9f69634bf6226e35 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 20 Apr 2007 16:26:12 +0000 Subject: [PATCH] use consistent URL encoding for Image::thumbUrl() whether hashed directories are in use or not --- includes/Image.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/Image.php b/includes/Image.php index c6b23aca87..aefdd7317a 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -772,13 +772,12 @@ class Image $path = $wgUploadPath; } if ( Image::isHashed( $this->fromSharedDirectory ) ) { - $url = "{$base}{$path}/thumb" . - wfGetHashPath($this->name, $this->fromSharedDirectory) - . $this->name.'/'.$thumbName; - $url = wfUrlencode( $url ); + $subdir = wfGetHashPath($this->name, $this->fromSharedDirectory) . + wfUrlencode( $this->name ); } else { - $url = "{$base}{$path}/thumb/{$thumbName}"; + $subdir = ''; } + $url = "{$base}{$path}/thumb{$subdir}/" . wfUrlencode( $thumbName ); return $url; } -- 2.20.1