Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -99,6 +99,7 @@ |
100 | 100 | * The class JpegOrTiffHandler was renamed ExifBitmapHandler. |
101 | 101 | * (bug 29443) Special:Undelete should use JavaScript to invert all checkboxes |
102 | 102 | without reloading the page |
| 103 | +* (bug 29325) Setting $wgStrictFileExtensions to false gives incorrect warning |
103 | 104 | |
104 | 105 | === API changes in 1.19 === |
105 | 106 | * BREAKING CHANGE: action=watch now requires POST and token. |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -509,6 +509,8 @@ |
510 | 510 | * @return Array of warnings |
511 | 511 | */ |
512 | 512 | public function checkWarnings() { |
| 513 | + global $wgLang; |
| 514 | + |
513 | 515 | $warnings = array(); |
514 | 516 | |
515 | 517 | $localFile = $this->getLocalFile(); |
— | — | @@ -529,7 +531,8 @@ |
530 | 532 | global $wgCheckFileExtensions, $wgFileExtensions; |
531 | 533 | if ( $wgCheckFileExtensions ) { |
532 | 534 | if ( !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) { |
533 | | - $warnings['filetype-unwanted-type'] = $this->mFinalExtension; |
| 535 | + $warnings['filetype-unwanted-type'] = array( $this->mFinalExtension, |
| 536 | + $wgLang->commaList( $wgFileExtensions ) ); |
534 | 537 | } |
535 | 538 | } |
536 | 539 | |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -567,7 +567,7 @@ |
568 | 568 | * @param $details Array: result of UploadBase::verifyUpload |
569 | 569 | */ |
570 | 570 | protected function processVerificationError( $details ) { |
571 | | - global $wgFileExtensions; |
| 571 | + global $wgFileExtensions, $wgLang; |
572 | 572 | |
573 | 573 | switch( $details['status'] ) { |
574 | 574 | |
— | — | @@ -597,13 +597,12 @@ |
598 | 598 | break; |
599 | 599 | case UploadBase::FILETYPE_BADTYPE: |
600 | 600 | $msg = wfMessage( 'filetype-banned-type' ); |
601 | | - $sep = wfMsg( 'comma-separator' ); |
602 | 601 | if ( isset( $details['blacklistedExt'] ) ) { |
603 | | - $msg->params( implode( $sep, $details['blacklistedExt'] ) ); |
| 602 | + $msg->params( $wgLang->commaList( $details['blacklistedExt'] ) ); |
604 | 603 | } else { |
605 | 604 | $msg->params( $details['finalExt'] ); |
606 | 605 | } |
607 | | - $msg->params( implode( $sep, $wgFileExtensions ), |
| 606 | + $msg->params( $wgLang->commaList( $wgFileExtensions ), |
608 | 607 | count( $wgFileExtensions ) ); |
609 | 608 | |
610 | 609 | // Add PLURAL support for the first parameter. This results |