r104358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104357‎ | r104358 | r104359 >
Date:19:17, 27 November 2011
Author:johnduhart
Status:reverted
Tags:
Comment:
Followup r104353, updating Special:Categories
Modified paths:
  • /trunk/phase3/includes/specials/SpecialCategories.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialCategories.php
@@ -35,7 +35,7 @@
3636 $this->outputHeader();
3737 $this->getOutput()->allowClickjacking();
3838
39 - $from = $this->getRequest()->getText( 'from', $par );
 39+ $from = $this->getRequest()->getText( 'wpFrom', $par );
4040
4141 $cap = new CategoryPager( $this->getContext(), $from );
4242 $cap->doQuery();
@@ -43,7 +43,7 @@
4444 $this->getOutput()->addHTML(
4545 Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) .
4646 $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() .
47 - $cap->getStartForm( $from ) .
 47+ $cap->buildHTMLForm() .
4848 $cap->getNavigationBar() .
4949 '<ul>' . $cap->getBody() . '</ul>' .
5050 $cap->getNavigationBar() .
@@ -118,16 +118,21 @@
119119 return Xml::tags( 'li', null, $this->getLanguage()->specialList( $titleText, $count ) ) . "\n";
120120 }
121121
122 - public function getStartForm( $from ) {
123 - global $wgScript;
 122+ protected function getHTMLFormFields() {
 123+ return array(
 124+ 'From' => array(
 125+ 'type' => 'text',
 126+ 'label-message' => 'categoriesfrom',
 127+ 'size' => '20',
 128+ ),
 129+ );
 130+ }
124131
125 - return
126 - Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
127 - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
128 - Xml::fieldset( $this->msg( 'categories' )->text(),
129 - Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(),
130 - 'from', 'from', 20, $from ) .
131 - ' ' .
132 - Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) );
 132+ protected function getHTMLFormLegend() {
 133+ return 'categories';
133134 }
 135+
 136+ protected function getHTMLFormSubmit() {
 137+ return 'allpagessubmit';
 138+ }
134139 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r105338Revert r104353, r104354, r104356, r104358, r104383: changes to pagers break...brion19:32, 6 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104353This is the rework I was talking about in r104318 for 1.19. Instead of having...johnduhart18:23, 27 November 2011

Status & tagging log