Last modified: 2010-10-24 13:52:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18968, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16968 - Special:Upload gives tedious warning about changing spaces to underscores in file names
Special:Upload gives tedious warning about changing spaces to underscores in ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch
: 17709 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-11 11:26 UTC by brianna.laugher
Modified: 2010-10-24 13:52 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description brianna.laugher 2009-01-11 11:26:18 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.
Comment 1 Chad H. 2009-01-12 14:29:09 UTC
Cleaned up in general in r45676
Comment 2 Brion Vibber 2009-01-14 19:57:59 UTC
Note there were several followups to that to tweak the capitals behavior; linked from code review comments.
Comment 3 Splarka 2009-06-20 07:31:43 UTC
*** Bug 17709 has been marked as a duplicate of this bug. ***
Comment 4 Subfader 2009-07-10 19:42:29 UTC
it's back in 1.16, maybe 1.15 too
Remove: 

if( $basename != $filtered ) {
  $warning .=  '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>';
}
Comment 5 Subfader 2009-07-10 19:43:51 UTC
*Remove: Well, that's what I did. I guess it also checks for bad characters in general
Comment 6 Bryan Tong Minh 2010-10-24 13:52:58 UTC
It was fixed somewhere along the way; at least in 1.17.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links