r45745 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45744‎ | r45745 | r45746 >
Date:20:03, 14 January 2009
Author:brion
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/upload.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/upload.js
@@ -131,8 +131,8 @@
132132 fname = path.substring(backslash+1, 10000);
133133 }
134134
135 - // Replace spaces by underscores
136 - fname = fname.replace(/ /g, '_');
 135+ // Capitalise first letter and replace spaces by underscores
 136+ fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
137137
138138 // Output result
139139 var destFile = document.getElementById('wpDestFile');
Index: trunk/phase3/RELEASE-NOTES
@@ -37,7 +37,6 @@
3838
3939 === Bug fixes in 1.15 ===
4040 * (bug 16968) Special:Upload no longer throws useless warnings.
41 -* (bug 15470) Special:Upload no longer force-capitalizes titles
4241 * (bug 17000) Special:RevisionDelete now checks if the database is locked before
4342 trying to delete the edit.
4443 * (bug 16852) padleft and padright now handle multibyte characters correctly

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45689bug 15470: Don't force-capitalize on Special:Upload. There's no point in thro...demon00:18, 13 January 2009

Status & tagging log