From: Brion Vibber Date: Wed, 14 Jan 2009 20:03:40 +0000 (+0000) Subject: Partial revert of r45689 "bug 15470: Don't force-capitalize on Special:Upload. There... X-Git-Tag: 1.31.0-rc.0~43421 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=87e16643ff43e77fcb7c84da2212918546a08d8a;p=lhc%2Fweb%2Fwiklou.git Partial revert of r45689 "bug 15470: Don't force-capitalize on Special:Upload. There's no point in throwing errors for any of this crap, really. I think this cleans up the last of the useless errors (for spacing/capitalization) in Special:Upload." This made the auto-filled destination file name no longer match what we would actually upload as. It would be better to make it *more* accurate (handling normalization of forbidden chars) rather than less accurate. The particular problem of bug 15470 should be resolved by actually checking how normalization should proceed, not by failing to do it. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ae49192bff..06621c710a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -37,7 +37,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. -* (bug 15470) Special:Upload no longer force-capitalizes titles * (bug 17000) Special:RevisionDelete now checks if the database is locked before trying to delete the edit. * (bug 16852) padleft and padright now handle multibyte characters correctly diff --git a/skins/common/upload.js b/skins/common/upload.js index 532d1676e5..d1cf4b3ee7 100644 --- a/skins/common/upload.js +++ b/skins/common/upload.js @@ -131,8 +131,8 @@ function fillDestFilename(id) { fname = path.substring(backslash+1, 10000); } - // Replace spaces by underscores - fname = fname.replace(/ /g, '_'); + // Capitalise first letter and replace spaces by underscores + fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_'); // Output result var destFile = document.getElementById('wpDestFile');