From 95ab6978be94c48a07248ad7988953531b5617ee Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 27 Sep 2016 20:31:48 -0700 Subject: [PATCH] Don't use NS_IMAGE Change-Id: Ie47300631ce074597ef2ce5cc370fb407f9f440f --- ImageMap_body.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImageMap_body.php b/ImageMap_body.php index 225341f..b65bb02 100644 --- a/ImageMap_body.php +++ b/ImageMap_body.php @@ -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 ) ) {