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