| Index: trunk/phase3/includes/upload/UploadBase.php |
| — | — | @@ -568,10 +568,9 @@ |
| 569 | 569 | if ( $this->mFinalExtension == '' ) { |
| 570 | 570 | $this->mTitleError = self::FILETYPE_MISSING; |
| 571 | 571 | return $this->mTitle = null; |
| 572 | | - } elseif ( ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) |
| 573 | | - && !$this->checkFileExtensionList( $ext, $wgFileExtensions ) ) || |
| 574 | | - ( $wgCheckFileExtensions && $wgStrictFileExtensions && |
| 575 | | - !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) { |
| | 572 | + } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) || |
| | 573 | + ( $wgCheckFileExtensions && $wgStrictFileExtensions && |
| | 574 | + !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) { |
| 576 | 575 | $this->mTitleError = self::FILETYPE_BADTYPE; |
| 577 | 576 | return $this->mTitle = null; |
| 578 | 577 | } |
| Index: trunk/phase3/includes/specials/SpecialUpload.php |
| — | — | @@ -899,6 +899,9 @@ |
| 900 | 900 | $wgFileExtensions, $wgFileBlacklist; |
| 901 | 901 | |
| 902 | 902 | if( $wgCheckFileExtensions ) { |
| | 903 | + //don't show blacklisted types as permitted |
| | 904 | + $wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist ); |
| | 905 | + |
| 903 | 906 | if( $wgStrictFileExtensions ) { |
| 904 | 907 | # Everything not permitted is banned |
| 905 | 908 | $extensionsList = |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -34,6 +34,7 @@ |
| 35 | 35 | cannot read the page in question. |
| 36 | 36 | * (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases |
| 37 | 37 | * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions |
| | 38 | +* (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form |
| 38 | 39 | |
| 39 | 40 | === API changes in 1.18 === |
| 40 | 41 | |