X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMIMEsearch.php;h=18c163e138ab448d82932424b16d728845e4fa70;hb=0530835635f7216cb94efbe42a28483e251d1570;hp=f43ed9bd6a83af73ff1c9255be912c61f1bc1e3c;hpb=23b7f3bbd553183a21d785bae175249efad5ee5d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index f43ed9bd6a..18c163e138 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -22,6 +22,8 @@ * @author Ævar Arnfjörð Bjarmason */ +use MediaWiki\MediaWikiServices; + /** * Searches the database for files of the requested MIME type, comparing this with the * 'img_major_mime' and 'img_minor_mime' fields in the image table. @@ -182,11 +184,9 @@ class MIMEsearchPage extends QueryPage { * @return string */ function formatResult( $skin, $result ) { - global $wgContLang; - $linkRenderer = $this->getLinkRenderer(); $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = $wgContLang->convert( $nt->getText() ); + $text = MediaWikiServices::getInstance()->getContentLanguage()->convert( $nt->getText() ); $plink = $linkRenderer->makeLink( Title::newFromText( $nt->getPrefixedText() ), $text