* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Special page for listing the articles with the fewest revisions.
*
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgContLang;
-
$nt = Title::makeTitleSafe( $result->namespace, $result->title );
if ( !$nt ) {
return Html::element(
)
);
}
+ $linkRenderer = $this->getLinkRenderer();
+ $text = MediaWikiServices::getInstance()->getContentLanguage()->
+ convert( htmlspecialchars( $nt->getPrefixedText() ) );
+ $plink = $linkRenderer->makeLink( $nt, new HtmlArmor( $text ) );
- $text = htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) );
- $plink = Linker::linkKnown( $nt, $text );
-
- $nl = $this->msg( 'nrevisions' )->numParams( $result->value )->escaped();
+ $nl = $this->msg( 'nrevisions' )->numParams( $result->value )->text();
$redirect = isset( $result->redirect ) && $result->redirect ?
' - ' . $this->msg( 'isredirect' )->escaped() : '';
- $nlink = Linker::linkKnown(
+ $nlink = $linkRenderer->makeKnownLink(
$nt,
$nl,
[],