Add rate limiter to Special:ConfirmEmail
[lhc/web/wiklou.git] / includes / specials / SpecialFewestrevisions.php
index 4a57c95..cf9da49 100644 (file)
@@ -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 ?