X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBlockList.php;h=39ca8dd746324a0d03811b6b8763511661674a31;hb=478a58f63101f2b47d18a618296b5e7970fa3f24;hp=de58762a7e6cddd230aac55bc6585fa27d6018bb;hpb=bb8608c98a3d677d8557dd7056a7434c7c38c055;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index de58762a7e..186e5ad741 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -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(), ], @@ -103,13 +96,14 @@ class SpecialBlockList extends SpecialPage { $context = new DerivativeContext( $this->getContext() ); $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = HTMLForm::factory( 'ooui', $fields, $context ); - $form->setMethod( 'get' ); - $form->setWrapperLegendMsg( 'ipblocklist-legend' ); - $form->setSubmitTextMsg( 'ipblocklist-submit' ); - $form->setSubmitProgressive(); - $form->prepareForm(); + $form + ->setMethod( 'get' ) + ->setFormIdentifier( 'blocklist' ) + ->setWrapperLegendMsg( 'ipblocklist-legend' ) + ->setSubmitTextMsg( 'ipblocklist-submit' ) + ->prepareForm() + ->displayForm( false ); - $form->displayForm( '' ); $this->showList( $pager ); } @@ -136,7 +130,7 @@ class SpecialBlockList extends SpecialPage { case Block::TYPE_IP: case Block::TYPE_RANGE: list( $start, $end ) = IP::parseRange( $target ); - $conds[] = wfGetDB( DB_SLAVE )->makeList( + $conds[] = wfGetDB( DB_REPLICA )->makeList( [ 'ipb_address' => $target, Block::getRangeCond( $start, $end )