Don't use NS_IMAGE

Change-Id: Icabf2534963ce2701402f211327f7f39b61735cc
This commit is contained in:
Kunal Mehta 2016-09-27 20:32:25 -07:00
parent 7de8998ff0
commit d4e5fff8dc

View file

@ -204,7 +204,7 @@ class SpecialNuke extends SpecialPage {
*/
list( $title, $userName ) = $info;
$image = $title->getNamespace() === NS_IMAGE ? wfLocalFile( $title ) : false;
$image = $title->inNamespace( NS_FILE ) ? wfLocalFile( $title ) : false;
$thumb = $image && $image->exists() ?
$image->transform( [ 'width' => 120, 'height' => 120 ], 0 ) :
false;