Followup r104353, updating Special:Categories
authorJohn Du Hart <johnduhart@users.mediawiki.org>
Sun, 27 Nov 2011 19:17:07 +0000 (19:17 +0000)
committerJohn Du Hart <johnduhart@users.mediawiki.org>
Sun, 27 Nov 2011 19:17:07 +0000 (19:17 +0000)
includes/specials/SpecialCategories.php

index 6d2831c..ee973c0 100644 (file)
@@ -35,7 +35,7 @@ class SpecialCategories extends SpecialPage {
                $this->outputHeader();
                $this->getOutput()->allowClickjacking();
 
-               $from = $this->getRequest()->getText( 'from', $par );
+               $from = $this->getRequest()->getText( 'wpFrom', $par );
 
                $cap = new CategoryPager( $this->getContext(), $from );
                $cap->doQuery();
@@ -43,7 +43,7 @@ class SpecialCategories extends SpecialPage {
                $this->getOutput()->addHTML(
                        Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) .
                        $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() .
-                       $cap->getStartForm( $from ) .
+                       $cap->buildHTMLForm() .
                        $cap->getNavigationBar() .
                        '<ul>' . $cap->getBody() . '</ul>' .
                        $cap->getNavigationBar() .
@@ -118,16 +118,21 @@ class CategoryPager extends AlphabeticPager {
                return Xml::tags( 'li', null, $this->getLanguage()->specialList( $titleText, $count ) ) . "\n";
        }
 
-       public function getStartForm( $from ) {
-               global $wgScript;
-
-               return
-                       Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
-                               Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
-                               Xml::fieldset( $this->msg( 'categories' )->text(),
-                                       Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(),
-                                               'from', 'from', 20, $from ) .
-                                       ' ' .
-                                       Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) );
+       protected function getHTMLFormFields() {
+               return array(
+                       'From' => array(
+                               'type' => 'text',
+                               'label-message' => 'categoriesfrom',
+                               'size' => '20',
+                       ),
+               );
+       }
+
+       protected function getHTMLFormLegend() {
+               return 'categories';
+       }
+
+       protected function getHTMLFormSubmit() {
+               return 'allpagessubmit';
        }
 }