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 commit is contained in:
Chad Horohoe 2009-01-13 00:18:40 +00:00
parent 1133ba2d29
commit 78253fcb46
4 changed files with 7 additions and 3 deletions

View file

@ -39,6 +39,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with LanguageConverter class)
* Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with LanguageConverter class)
* (bug 16968) Special:Upload no longer throws useless warnings.
* (bug 15470) Special:Upload no longer force-capitalizes titles
== API changes in 1.15 ==
* (bug 16798) JSON encoding errors for some characters outside the BMP

View file

@ -1455,7 +1455,7 @@ $wgCacheEpoch = '20030516000000';
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
$wgStyleVersion = '196';
$wgStyleVersion = '197';
# Server-side caching:

View file

@ -504,6 +504,9 @@ class UploadForm {
if ( ! $this->mIgnoreWarning ) {
$warning = '';
global $wgCapitalLinks;
if ( $wgCapitalLinks ) ucfirst( $basename );
if( str_replace( ' ', '_', $basename ) != $filtered ) {
$warning .= '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>';
}

View file

@ -131,8 +131,8 @@ function fillDestFilename(id) {
fname = path.substring(backslash+1, 10000);
}
// Capitalise first letter and replace spaces by underscores
fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
// Replace spaces by underscores
fname = fname.replace(/ /g, '_');
// Output result
var destFile = document.getElementById('wpDestFile');