Followup r104353, updating Special:NewFiles
authorJohn Du Hart <johnduhart@users.mediawiki.org>
Sun, 27 Nov 2011 19:03:56 +0000 (19:03 +0000)
committerJohn Du Hart <johnduhart@users.mediawiki.org>
Sun, 27 Nov 2011 19:03:56 +0000 (19:03 +0000)
includes/specials/SpecialNewimages.php

index 5dc951e..a4860ac 100644 (file)
@@ -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';
        }
 }