Special:BlockList: Chain methods of HTMLForm
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Tue, 18 Oct 2016 17:12:00 +0000 (19:12 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 19 Oct 2016 19:10:14 +0000 (19:10 +0000)
Much easier to read. Also, changed '' as a value for displayForm
to false.

Change-Id: Iab932d34952a1f7aab9da02d5ddf137edd53ad43

includes/specials/SpecialBlockList.php

index c4fb316..39ca8dd 100644 (file)
@@ -103,13 +103,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' )
+                       ->setWrapperLegendMsg( 'ipblocklist-legend' )
+                       ->setSubmitTextMsg( 'ipblocklist-submit' )
+                       ->setSubmitProgressive()
+                       ->prepareForm()
+                       ->displayForm( false );
 
-               $form->displayForm( '' );
                $this->showList( $pager );
        }