Merge "Use BlockListPager::getLimitSelectList() in Special:BlockList and Special...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 7 May 2018 22:03:33 +0000 (22:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 7 May 2018 22:03:33 +0000 (22:03 +0000)
includes/specials/SpecialAutoblockList.php
includes/specials/SpecialBlockList.php

index 4d2d1b9..e1909f5 100644 (file)
@@ -42,7 +42,6 @@ class SpecialAutoblockList extends SpecialPage {
                $this->setHeaders();
                $this->outputHeader();
                $out = $this->getOutput();
-               $lang = $this->getLanguage();
                $out->setPageTitle( $this->msg( 'autoblocklist' ) );
                $this->addHelpLink( 'Autoblock' );
                $out->addModuleStyles( [ 'mediawiki.special' ] );
@@ -55,13 +54,7 @@ class SpecialAutoblockList extends SpecialPage {
                        'Limit' => [
                                'type' => 'limitselect',
                                'label-message' => 'table_pager_limit_label',
-                               'options' => [
-                                       $lang->formatNum( 20 ) => 20,
-                                       $lang->formatNum( 50 ) => 50,
-                                       $lang->formatNum( 100 ) => 100,
-                                       $lang->formatNum( 250 ) => 250,
-                                       $lang->formatNum( 500 ) => 500,
-                               ],
+                               'options' => $pager->getLimitSelectList(),
                                'name' => 'limit',
                                'default' => $pager->getLimit(),
                        ]
index 667b814..186e5ad 100644 (file)
@@ -44,7 +44,6 @@ class SpecialBlockList extends SpecialPage {
                $this->setHeaders();
                $this->outputHeader();
                $out = $this->getOutput();
-               $lang = $this->getLanguage();
                $out->setPageTitle( $this->msg( 'ipblocklist' ) );
                $out->addModuleStyles( [ 'mediawiki.special' ] );
 
@@ -89,13 +88,7 @@ class SpecialBlockList extends SpecialPage {
                        'Limit' => [
                                'type' => 'limitselect',
                                'label-message' => 'table_pager_limit_label',
-                               'options' => [
-                                       $lang->formatNum( 20 ) => 20,
-                                       $lang->formatNum( 50 ) => 50,
-                                       $lang->formatNum( 100 ) => 100,
-                                       $lang->formatNum( 250 ) => 250,
-                                       $lang->formatNum( 500 ) => 500,
-                               ],
+                               'options' => $pager->getLimitSelectList(),
                                'name' => 'limit',
                                'default' => $pager->getLimit(),
                        ],