* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* A querypage to list the most wanted categories - implements Special:Wantedcategories
*
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgContLang;
-
$nt = Title::makeTitle( $result->namespace, $result->title );
- $text = $wgContLang->convert( $nt->getText() );
+ $text = MediaWikiServices::getInstance()->getContentLanguage()->convert( $nt->getText() );
if ( !$this->isCached() ) {
// We can assume the freshest data