r104356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104355‎ | r104356 | r104357 >
Date:19:03, 27 November 2011
Author:johnduhart
Status:reverted
Tags:
Comment:
Followup r104353, updating Special:NewFiles
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -30,16 +30,15 @@
3131 $this->setHeaders();
3232 $this->outputHeader();
3333
 34+ $out = $this->getOutput();
3435 $pager = new NewFilesPager( $this->getContext(), $par );
3536
3637 if ( !$this->including() ) {
37 - $form = $pager->getForm();
38 - $form->prepareForm();
39 - $form->displayForm( '' );
 38+ $out->addHTML( $pager->buildHTMLForm() );
4039 }
41 - $this->getOutput()->addHTML( $pager->getBody() );
 40+ $out->addHTML( $pager->getBody() );
4241 if ( !$this->including() ) {
43 - $this->getOutput()->addHTML( $pager->getNavigationBar() );
 42+ $out->addHTML( $pager->getNavigationBar() );
4443 }
4544 }
4645 }
@@ -120,7 +119,7 @@
121120 );
122121 }
123122
124 - function getForm() {
 123+ protected function getHTMLFormFields() {
125124 global $wgMiserMode;
126125
127126 $fields = array(
@@ -133,30 +132,21 @@
134133 'type' => 'check',
135134 'label' => wfMessage( 'showhidebots', wfMsg( 'show' ) ),
136135 'name' => 'showbots',
137 - # 'default' => $this->getRequest()->getBool( 'showbots', 0 ),
138136 ),
139 - 'limit' => array(
140 - 'type' => 'hidden',
141 - 'default' => $this->getRequest()->getText( 'limit' ),
142 - 'name' => 'limit',
143 - ),
144 - 'offset' => array(
145 - 'type' => 'hidden',
146 - 'default' => $this->getRequest()->getText( 'offset' ),
147 - 'name' => 'offset',
148 - ),
149137 );
150138
151139 if( $wgMiserMode ){
152140 unset( $fields['like'] );
153141 }
154142
155 - $form = new HTMLForm( $fields, $this->getContext() );
156 - $form->setTitle( $this->getTitle() );
157 - $form->setSubmitText( wfMsg( 'ilsubmit' ) );
158 - $form->setMethod( 'get' );
159 - $form->setWrapperLegend( wfMsg( 'newimages-legend' ) );
 143+ return $fields;
 144+ }
160145
161 - return $form;
 146+ protected function getHTMLFormLegend() {
 147+ return 'newimages-legend';
162148 }
 149+
 150+ protected function getHTMLFormSubmit() {
 151+ return 'ilsubmit';
 152+ }
163153 }

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