(bug 16968) Don't throw useless warnings on Special:Upload. We don't warn the user...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 12 Jan 2009 14:28:46 +0000 (14:28 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 12 Jan 2009 14:28:46 +0000 (14:28 +0000)
RELEASE-NOTES
includes/specials/SpecialUpload.php

index 8258d34..d744a0c 100644 (file)
@@ -38,6 +38,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 === Bug fixes in 1.15 ===
 * 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.
 
 == API changes in 1.15 ==
 * (bug 16798) JSON encoding errors for some characters outside the BMP
index 971de04..3e2c02a 100644 (file)
@@ -504,13 +504,14 @@ class UploadForm {
                if ( ! $this->mIgnoreWarning ) {
                        $warning = '';
 
+                       if( str_replace( ' ', '_', $basename ) != $filtered ) {
+                               $warning .=  '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>';
+                       }
+
                        global $wgCapitalLinks;
                        if( $wgCapitalLinks ) {
                                $filtered = ucfirst( $filtered );
                        }
-                       if( $basename != $filtered ) {
-                               $warning .=  '<li>'.wfMsgHtml( 'badfilename', htmlspecialchars( $this->mDestName ) ).'</li>';
-                       }
 
                        global $wgCheckFileExtensions;
                        if ( $wgCheckFileExtensions ) {