<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Implementation of near match title search.
* TODO: split into service/implementation.
/**
* Do a near match (see SearchEngine::getNearMatch) and wrap it into a
- * SearchResultSet.
+ * ISearchResultSet.
*
* @param string $searchterm
- * @return SearchResultSet
+ * @return ISearchResultSet
*/
public function getNearMatchResultSet( $searchterm ) {
return new SearchNearMatchResultSet( $this->getNearMatch( $searchterm ) );
# 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;
}