From: John Du Hart Date: Sun, 27 Nov 2011 19:03:56 +0000 (+0000) Subject: Followup r104353, updating Special:NewFiles X-Git-Tag: 1.31.0-rc.0~26266 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=4144ac1917c4fe8dcc59528d4ba46442e5d9ac61;p=lhc%2Fweb%2Fwiklou.git Followup r104353, updating Special:NewFiles --- diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 5dc951eb4e..a4860ac055 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -30,16 +30,15 @@ class SpecialNewFiles extends IncludableSpecialPage { $this->setHeaders(); $this->outputHeader(); + $out = $this->getOutput(); $pager = new NewFilesPager( $this->getContext(), $par ); if ( !$this->including() ) { - $form = $pager->getForm(); - $form->prepareForm(); - $form->displayForm( '' ); + $out->addHTML( $pager->buildHTMLForm() ); } - $this->getOutput()->addHTML( $pager->getBody() ); + $out->addHTML( $pager->getBody() ); if ( !$this->including() ) { - $this->getOutput()->addHTML( $pager->getNavigationBar() ); + $out->addHTML( $pager->getNavigationBar() ); } } } @@ -120,7 +119,7 @@ class NewFilesPager extends ReverseChronologicalPager { ); } - function getForm() { + protected function getHTMLFormFields() { global $wgMiserMode; $fields = array( @@ -133,17 +132,6 @@ class NewFilesPager extends ReverseChronologicalPager { 'type' => 'check', 'label' => wfMessage( 'showhidebots', wfMsg( 'show' ) ), 'name' => 'showbots', - # 'default' => $this->getRequest()->getBool( 'showbots', 0 ), - ), - 'limit' => array( - 'type' => 'hidden', - 'default' => $this->getRequest()->getText( 'limit' ), - 'name' => 'limit', - ), - 'offset' => array( - 'type' => 'hidden', - 'default' => $this->getRequest()->getText( 'offset' ), - 'name' => 'offset', ), ); @@ -151,12 +139,14 @@ class NewFilesPager extends ReverseChronologicalPager { unset( $fields['like'] ); } - $form = new HTMLForm( $fields, $this->getContext() ); - $form->setTitle( $this->getTitle() ); - $form->setSubmitText( wfMsg( 'ilsubmit' ) ); - $form->setMethod( 'get' ); - $form->setWrapperLegend( wfMsg( 'newimages-legend' ) ); + return $fields; + } + + protected function getHTMLFormLegend() { + return 'newimages-legend'; + } - return $form; + protected function getHTMLFormSubmit() { + return 'ilsubmit'; } }