Don't use NS_IMAGE

Change-Id: Ie47300631ce074597ef2ce5cc370fb407f9f440f
This commit is contained in:
Kunal Mehta 2016-09-27 20:31:48 -07:00
parent aef77622ee
commit 95ab6978be

View file

@ -79,7 +79,7 @@ class ImageMap {
list( $image, $options ) = $bits;
}
$imageTitle = Title::newFromText( $image );
if ( !$imageTitle || $imageTitle->getNamespace() != NS_IMAGE ) {
if ( !$imageTitle || !$imageTitle->inNamespace( NS_FILE ) ) {
return self::error( 'imagemap_no_image' );
}
if ( wfIsBadImage( $imageTitle->getDBkey(), $parser->mTitle ) ) {