Index: branches/extensionless-files/includes/Title.php |
— | — | @@ -2671,14 +2671,14 @@ |
2672 | 2672 | if( $this->getNamespace() == NS_FILE ) { |
2673 | 2673 | $file = wfLocalFile( $this ); |
2674 | 2674 | if( $file->exists() ) { |
2675 | | - global $wgCheckTitleFileExtensions; |
| 2675 | + global $wgCheckFileExtensions; |
2676 | 2676 | if( $nt->getNamespace() != NS_FILE ) { |
2677 | 2677 | $errors[] = array('imagenocrossnamespace'); |
2678 | 2678 | } |
2679 | 2679 | if( $nt->getText() != wfStripIllegalFilenameChars( $nt->getText() ) ) { |
2680 | 2680 | $errors[] = array('imageinvalidfilename'); |
2681 | 2681 | } |
2682 | | - if( $wgCheckTitleFileExtensions && |
| 2682 | + if( $wgCheckFileExtensions && |
2683 | 2683 | !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) { |
2684 | 2684 | $errors[] = array('imagetypemismatch'); |
2685 | 2685 | } |
Index: branches/extensionless-files/includes/DefaultSettings.php |
— | — | @@ -2177,7 +2177,7 @@ |
2178 | 2178 | * with file extensions of uploaded files (e.g if true, disallow a JPEG called |
2179 | 2179 | * "File:Foo", but allow "File:Foo.jpg"). |
2180 | 2180 | */ |
2181 | | -$wgCheckTitleFileExtensions = true; |
| 2181 | +$wgCheckFileExtensions = true; |
2182 | 2182 | |
2183 | 2183 | /** |
2184 | 2184 | * If this is turned off, users may override the warning for files not covered |
Index: branches/extensionless-files/includes/upload/UploadBase.php |
— | — | @@ -311,8 +311,8 @@ |
312 | 312 | $warnings['badfilename'] = $filename; |
313 | 313 | |
314 | 314 | // Check whether the file extension is on the unwanted list |
315 | | - global $wgCheckTitleFileExtensions, $wgFileExtensions; |
316 | | - if ( $wgCheckTitleFileExtensions ) { |
| 315 | + global $wgCheckFileExtensions, $wgFileExtensions; |
| 316 | + if ( $wgCheckFileExtensions ) { |
317 | 317 | if ( !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) |
318 | 318 | $warnings['filetype-unwanted-type'] = array($this->mFinalExtension, |
319 | 319 | implode(", ", $wgFileExtensions)); |
— | — | @@ -409,9 +409,9 @@ |
410 | 410 | } |
411 | 411 | |
412 | 412 | /* Don't allow users to override the blacklist (check file extension) */ |
413 | | - global $wgCheckTitleFileExtensions, $wgStrictFileExtensions; |
| 413 | + global $wgCheckFileExtensions, $wgStrictFileExtensions; |
414 | 414 | global $wgFileExtensions, $wgFileBlacklist; |
415 | | - if ( $wgCheckTitleFileExtensions ) { |
| 415 | + if ( $wgCheckFileExtensions ) { |
416 | 416 | if ( $this->mFinalExtension == '' ) { |
417 | 417 | $this->mTitleError = self::FILETYPE_MISSING; |
418 | 418 | return $this->mTitle = null; |