From 17c819276b5692d2c5fb540e0572e395aa9c1c73 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 14 Jan 2009 19:56:42 +0000 Subject: [PATCH] Followup to r45676, r45688, r45689, but this time actually working. :) For bug 16968 -- don't throw a filename change warning when we auto-capitalize the file per $wgCapitalLinks. --- includes/specials/SpecialUpload.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index e5a3cf9543..adfea71aaf 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -504,10 +504,13 @@ class UploadForm { if ( ! $this->mIgnoreWarning ) { $warning = ''; - global $wgCapitalLinks; - if ( $wgCapitalLinks ) ucfirst( $basename ); + $comparableName = str_replace( ' ', '_', $basename ); + global $wgCapitalLinks, $wgContLang; + if ( $wgCapitalLinks ) { + $comparableName = $wgContLang->ucfirst( $comparableName ); + } - if( str_replace( ' ', '_', $basename ) != $filtered ) { + if( $comparableName !== $filtered ) { $warning .= '
  • '.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'
  • '; } -- 2.20.1