<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Implementation of near match title search.
* TODO: split into service/implementation.
# There may have been a funny upload, or it may be on a shared
# file repository such as Wikimedia Commons.
if ( $title->getNamespace() == NS_FILE ) {
- $image = wfFindFile( $title );
+ $image = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title );
if ( $image ) {
return $title;
}