X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWantedcategories.php;h=5c622983606c749f2698270407540c4cfc38bfb7;hb=4356572546b2b4e8eefda9bf10943ba1b12526b9;hp=9bf44adffd862ad0afd0e8623e06d4e3ebb4ffac;hpb=a5be382adfdad4678eec18413c6a118cb3284daf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWantedcategories.php b/includes/specials/SpecialWantedcategories.php index 9bf44adffd..5c62298360 100644 --- a/includes/specials/SpecialWantedcategories.php +++ b/includes/specials/SpecialWantedcategories.php @@ -23,6 +23,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A querypage to list the most wanted categories - implements Special:Wantedcategories * @@ -88,27 +90,21 @@ class WantedCategoriesPage extends WantedQueryPage { * @return string */ function formatResult( $skin, $result ) { - global $wgContLang; - $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) ); + $text = new HtmlArmor( MediaWikiServices::getInstance()->getContentLanguage() + ->convert( htmlspecialchars( $nt->getText() ) ) ); if ( !$this->isCached() ) { // We can assume the freshest data - $plink = Linker::link( + $plink = $this->getLinkRenderer()->makeBrokenLink( $nt, - $text, - [], - [], - [ 'broken' ] + $text ); $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped(); } else { - $plink = Linker::link( $nt, $text ); + $plink = $this->getLinkRenderer()->makeLink( $nt, $text ); - $currentValue = isset( $this->currentCategoryCounts[$result->title] ) - ? $this->currentCategoryCounts[$result->title] - : 0; + $currentValue = $this->currentCategoryCounts[$result->title] ?? 0; $cachedValue = intval( $result->value ); // T76910 // If the category has been created or emptied since the list was refreshed, strike it