Last modified: 2010-10-24 13:52:58 UTC
Hi, I have a feeling that this used to be fixed, but in recent weeks or months it seems to have reverted. If you upload a file with a destination filename "Test name with spaces.png", and don't tick "ignore all warnings", you get this warning: File name has been changed to "Test_name_with_spaces.png". This warning is basically pointless and just encourages people to tick "ignore all warnings". in SpecialUpload.php there is global $wgCapitalLinks; if( $wgCapitalLinks ) { $filtered = ucfirst( $filtered ); } if( $basename != $filtered ) { $warning .= '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>'; } should probably add something like $filteredunderscores = str_replace(" ","_",$filtered); and compare $basename to $filteredunderscores instead of $filtered.
Cleaned up in general in r45676
Note there were several followups to that to tweak the capitals behavior; linked from code review comments.
*** Bug 17709 has been marked as a duplicate of this bug. ***
it's back in 1.16, maybe 1.15 too Remove: if( $basename != $filtered ) { $warning .= '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>'; }
*Remove: Well, that's what I did. I guess it also checks for bad characters in general
It was fixed somewhere along the way; at least in 1.17.