From 072ee9bd72b13ada51227ff32ec9b800a728790c Mon Sep 17 00:00:00 2001 From: Rob Church Date: Thu, 21 Dec 2006 17:08:00 +0000 Subject: [PATCH] * (bug 6603) When warning about invalid file extensions, output the bit of the extension we actually checked (The extension extraction code could do with some more improvement) --- RELEASE-NOTES | 2 ++ includes/SpecialUpload.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 50b04e1517..e2860b9688 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -365,6 +365,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN one. * (bug 8335) Set image width to the first valid parameter found. * (bug 8350) Fix watchlist viewing bug when using Postgres. +* (bug 6603) When warning about invalid file extensions, output the bit + of the extension we actually checked == Languages updated == diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index daa50b3d50..011cfa6533 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -353,7 +353,7 @@ class UploadForm { if( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) || ($wgStrictFileExtensions && !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) { - return $this->uploadError( wfMsgHtml( 'badfiletype', htmlspecialchars( $fullExt ) ) ); + return $this->uploadError( wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ) ); } /** @@ -396,7 +396,7 @@ class UploadForm { global $wgCheckFileExtensions; if ( $wgCheckFileExtensions ) { if ( ! $this->checkFileExtension( $finalExt, $wgFileExtensions ) ) { - $warning .= '
  • '.wfMsgHtml( 'badfiletype', htmlspecialchars( $fullExt ) ).'
  • '; + $warning .= '
  • '.wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ).'
  • '; } } -- 2.20.1