X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialFewestrevisions.php;h=cf9da49effe7514f8e61e28918ad7a7baa6d4770;hp=4a57c95eb36a834240d268253155dc2701317007;hb=1dd54d80af8403c0f36746f482a46ffb41fb28ed;hpb=9171317645de4d31c61c570a9e4fa765e09ecc4d diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index 4a57c95eb3..cf9da49eff 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -49,13 +49,15 @@ class FewestrevisionsPage extends QueryPage { 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'COUNT(*)', - 'redirect' => 'page_is_redirect' ], 'conds' => [ - 'page_namespace' => MWNamespace::getContentNamespaces(), - 'page_id = rev_page' ], + 'page_namespace' => MediaWikiServices::getInstance()->getNamespaceInfo()-> + getContentNamespaces(), + 'page_id = rev_page', + 'page_is_redirect = 0', + ], 'options' => [ - 'GROUP BY' => [ 'page_namespace', 'page_title', 'page_is_redirect' ] + 'GROUP BY' => [ 'page_namespace', 'page_title' ] ] ]; } @@ -84,8 +86,8 @@ class FewestrevisionsPage extends QueryPage { } $linkRenderer = $this->getLinkRenderer(); $text = MediaWikiServices::getInstance()->getContentLanguage()-> - convert( $nt->getPrefixedText() ); - $plink = $linkRenderer->makeLink( $nt, $text ); + 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 ?