From: Raimond Spekking Date: Mon, 3 Sep 2007 15:06:30 +0000 (+0000) Subject: Fix a regression from the file repo stuff. X-Git-Tag: 1.31.0-rc.0~51548 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=6ef236c92cabe13741165578787e360561a74bbd;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 );