Index: trunk/phase3/skins/common/upload.js |
— | — | @@ -271,9 +271,12 @@ |
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
275 | | - // Capitalise first letter and replace spaces by underscores |
276 | | - // FIXME: $wgCapitalizedNamespaces |
277 | | - fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_'); |
| 275 | + // Replace spaces by underscores |
| 276 | + fname = fname.replace( / /g, '_' ); |
| 277 | + // Capitalise first letter if needed |
| 278 | + if ( wgCapitalizeUploads ) { |
| 279 | + fname = fname.charAt( 0 ).toUpperCase().concat( fname.substring( 1, 10000 ) ); |
| 280 | + } |
278 | 281 | |
279 | 282 | // Output result |
280 | 283 | var destFile = document.getElementById('wpDestFile'); |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -1056,6 +1056,7 @@ |
1057 | 1057 | $this->mDestFile === '', |
1058 | 1058 | 'wgUploadSourceIds' => $this->mSourceIds, |
1059 | 1059 | 'wgStrictFileExtensions' => $wgStrictFileExtensions, |
| 1060 | + 'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ), |
1060 | 1061 | ); |
1061 | 1062 | |
1062 | 1063 | $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -280,6 +280,7 @@ |
281 | 281 | to avoid query errors about duplicate keynames. |
282 | 282 | * (bug 24700) Update dialog shown when clicking on the special page tab after |
283 | 283 | saving preferences |
| 284 | +* (bug 15470) First letters of filenames are always capitalized by upload JS. |
284 | 285 | |
285 | 286 | === API changes in 1.17 === |
286 | 287 | * (bug 22738) Allow filtering by action type on query=logevent. |