From: Brion Vibber Date: Wed, 14 Jan 2009 19:56:42 +0000 (+0000) Subject: Followup to r45676, r45688, r45689, but this time actually working. :) X-Git-Tag: 1.31.0-rc.0~43422 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=17c819276b5692d2c5fb540e0572e395aa9c1c73;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) ).'
  • '; }