bug 15470: Don't force-capitalize on Special:Upload. There's no point in throwing...
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 13 Jan 2009 00:18:40 +0000 (00:18 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 13 Jan 2009 00:18:40 +0000 (00:18 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/specials/SpecialUpload.php
skins/common/upload.js

index 3a3f53a..a0e2b98 100644 (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
index e56713b..d849910 100644 (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:
index 51f31c4..7a92f9b 100644 (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>';
                        }
index d1cf4b3..532d167 100644 (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');