From 6ef236c92cabe13741165578787e360561a74bbd Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 3 Sep 2007 15:06:30 +0000 Subject: [PATCH] Fix a regression from the file repo stuff. $file->getExtension returns now a normalized, lower case extension but the check needs the original extension from the upload input form. --- includes/SpecialUpload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index a254a1df1e..fb3f446866 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -459,7 +459,7 @@ class UploadForm { // Check for uppercase extension. We allow these filenames but check if an image // with lowercase extension exists already $warning = ''; - $ext = $file->getExtension(); + $ext = substr( $file->getName(), strlen( $file->getName() ) - strlen( $file->getExtension() ), strlen( $file->getExtension() ) ); $sk = $wgUser->getSkin(); if ( $ext !== '' ) { $partname = substr( $file->getName(), 0, -strlen( $ext ) - 1 ); -- 2.20.1