X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fsearch%2FSearchNearMatcher.php;h=4715c7541db3b75b30bc17764fac47b161b02ec1;hb=eee30a9434ba5ba2dc2f1c2b3b5632543fcbc773;hp=0a644934c47c05eee2c9f4ef3318cf8d2e8f5c3f;hpb=b53f299af26aa0b14b3cd3cc37ec1126a61cdc62;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchNearMatcher.php b/includes/search/SearchNearMatcher.php index 0a644934c4..4715c7541d 100644 --- a/includes/search/SearchNearMatcher.php +++ b/includes/search/SearchNearMatcher.php @@ -1,5 +1,7 @@ getNearMatch( $searchterm ) ); @@ -150,7 +152,7 @@ class SearchNearMatcher { # 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; } @@ -165,7 +167,7 @@ class SearchNearMatcher { # Quoted term? Try without the quotes... $matches = []; if ( preg_match( '/^"([^"]+)"$/', $searchterm, $matches ) ) { - return self::getNearMatch( $matches[1] ); + return $this->getNearMatch( $matches[1] ); } return null;