(bug 18372) $wgFileExtensions will now override $wgFileBlacklist
authorBenjamin Lees <emufarmers@users.mediawiki.org>
Tue, 7 Dec 2010 03:21:00 +0000 (03:21 +0000)
committerBenjamin Lees <emufarmers@users.mediawiki.org>
Tue, 7 Dec 2010 03:21:00 +0000 (03:21 +0000)
RELEASE-NOTES
includes/upload/UploadBase.php

index 2a84135..804ad86 100644 (file)
@@ -466,6 +466,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes.
   show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles
 * rebuildFileCache.php no longer creates inappropriate cache files for redirects
 * (bug 23119) WikiError class and subclasses are now marked as deprecated
+* (bug 18372) $wgFileExtensions will now override $wgFileBlacklist 
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 1e3414f..424ce11 100644 (file)
@@ -568,9 +568,10 @@ abstract class UploadBase {
                if ( $this->mFinalExtension == '' ) {
                        $this->mTitleError = self::FILETYPE_MISSING;
                        return $this->mTitle = null;
-               } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) ||
-                               ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
-                                       !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
+               } elseif ( ( $this->checkFileExtensionList( $ext, $wgFileBlacklist )
+                               && !$this->checkFileExtensionList( $ext, $wgFileExtensions ) ) ||
+                                       ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
+                                               !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
                        $this->mTitleError = self::FILETYPE_BADTYPE;
                        return $this->mTitle = null;
                }