From: Brion Vibber Date: Fri, 20 Apr 2007 16:26:12 +0000 (+0000) Subject: use consistent URL encoding for Image::thumbUrl() whether hashed directories are... X-Git-Tag: 1.31.0-rc.0~53323 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=6dff4efc614c5990f4a8bf6d9f69634bf6226e35;p=lhc%2Fweb%2Fwiklou.git use consistent URL encoding for Image::thumbUrl() whether hashed directories are in use or not --- 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; }