Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -746,7 +746,9 @@ |
747 | 747 | 'minlength', |
748 | 748 | 'illegalfilename', |
749 | 749 | 'badfilename', |
750 | | - 'badfiletype', |
| 750 | + 'filetype-badtype', |
| 751 | + 'filetype-badmime', |
| 752 | + 'filetype-missing', |
751 | 753 | 'large-file', |
752 | 754 | 'largefileserver', |
753 | 755 | 'emptyfile', |
Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -347,10 +347,12 @@ |
348 | 348 | /* Don't allow users to override the blacklist (check file extension) */ |
349 | 349 | global $wgStrictFileExtensions; |
350 | 350 | global $wgFileExtensions, $wgFileBlacklist; |
351 | | - if( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) || |
352 | | - ($wgStrictFileExtensions && |
353 | | - !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) { |
354 | | - return $this->uploadError( wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ) ); |
| 351 | + if ($finalExt == '') { |
| 352 | + return $this->uploadError( wfMsgExt( 'filetype-missing', array ( 'parseinline' ) ) ); |
| 353 | + } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) || |
| 354 | + ($wgStrictFileExtensions && |
| 355 | + !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) { |
| 356 | + return $this->uploadError( wfMsgExt( 'filetype-badtype', array ( 'parseinline' ), htmlspecialchars( $finalExt ), implode ( ', ', $wgFileExtensions ) ) ); |
355 | 357 | } |
356 | 358 | |
357 | 359 | /** |
— | — | @@ -393,7 +395,7 @@ |
394 | 396 | global $wgCheckFileExtensions; |
395 | 397 | if ( $wgCheckFileExtensions ) { |
396 | 398 | if ( ! $this->checkFileExtension( $finalExt, $wgFileExtensions ) ) { |
397 | | - $warning .= '<li>'.wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ).'</li>'; |
| 399 | + $warning .= '<li>'.wfMsgExt( 'filetype-badtype', array ( 'parseinline' ), htmlspecialchars( $finalExt ), implode ( ', ', $wgFileExtensions ) ).'</li>'; |
398 | 400 | } |
399 | 401 | } |
400 | 402 | |
— | — | @@ -927,7 +929,7 @@ |
928 | 930 | global $wgMimeTypeBlacklist; |
929 | 931 | if( isset($wgMimeTypeBlacklist) && !is_null($wgMimeTypeBlacklist) |
930 | 932 | && $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) { |
931 | | - return new WikiErrorMsg( 'badfiletype', htmlspecialchars( $mime ) ); |
| 933 | + return new WikiErrorMsg( 'filetype-badmime', htmlspecialchars( $mime ) ); |
932 | 934 | } |
933 | 935 | } |
934 | 936 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1326,7 +1326,10 @@ |
1327 | 1327 | 'minlength' => 'File names must be at least three letters.', |
1328 | 1328 | 'illegalfilename' => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.', |
1329 | 1329 | 'badfilename' => 'File name has been changed to "$1".', |
1330 | | -'badfiletype' => "\".$1\" is not a recommended image file format.", |
| 1330 | +'filetype-badmime' => 'Files of the MIME type "$1" are not allowed to be uploaded.', |
| 1331 | +'filetype-badtype' => "'''\".$1\"''' is an unwanted file type |
| 1332 | +: List of allowed file types: $2", |
| 1333 | +'filetype-missing' => 'The file has no extension (like ".jpg").', |
1331 | 1334 | 'large-file' => 'It is recommended that files are no larger than $1; this file is $2.', |
1332 | 1335 | 'largefileserver' => 'This file is bigger than the server is configured to allow.', |
1333 | 1336 | 'emptyfile' => 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -941,7 +941,10 @@ |
942 | 942 | 'minlength' => 'Dateinamen müssen mindestens drei Buchstaben lang sein.', |
943 | 943 | 'illegalfilename' => 'Der Dateiname „$1“ enthält mindestens ein nicht erlaubtes Zeichen. Bitte benennen Sie die Datei um und versuchen Sie diese erneut hochzuladen.', |
944 | 944 | 'badfilename' => 'Der Dateiname wurde in „$1“ geändert.', |
945 | | -'badfiletype' => '„.$1“ ist kein empfohlenes Dateiformat.', |
| 945 | +'filetype-badmime' => 'Dateien mit dem MIME-Typ „$1“ dürfen nicht hochgeladen werden.', |
| 946 | +'filetype-badtype' => "'''„.$1“''' ist ein unerwünschtes Dateiformat. |
| 947 | +: Erlaubt sind: $2", |
| 948 | +'filetype-missing' => "Die hochzuladende Datei hat keine Erweiterung (z. B. „.jpg“).", |
946 | 949 | 'large-file' => 'Die Dateigröße sollte nach Möglichkeit $1 nicht überschreiten. Diese Datei ist $2 groß.', |
947 | 950 | 'largefileserver' => 'Die Datei ist größer als die vom Server eingestellte Maximalgröße.', |
948 | 951 | 'emptyfile' => 'Die hochgeladene Datei ist leer. Der Grund kann ein Tippfehler im Dateinamen sein. Bitte kontrollieren Sie, ob Sie die Datei wirklich hochladen wollen.', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -242,6 +242,7 @@ |
243 | 243 | * (bug 3953) Work around poor display of parenthesis in the in other |
244 | 244 | languages section of MonoBook skin |
245 | 245 | * (bug 8539) Enable PLURAL option for another message of recentchanges. |
| 246 | +* (bug 8728) MediaWiki:Badfiletype splitted into 3 messages |
246 | 247 | |
247 | 248 | == Languages updated == |
248 | 249 | |