r44838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44837‎ | r44838 | r44839 >
Date:09:08, 20 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Use XML functions here
Modified paths:
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php (modified) (history)
  • /trunk/extensions/ProfileMonitor/ProfileMonitor.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php
@@ -165,9 +165,9 @@
166166 $fields = array ();
167167
168168 // Who to block
169 - $fields['ipaddress'] = wfInput( 'wpAddress', 45, $this->mAddress );
 169+ $fields['ipaddress'] = Xml::input( 'wpAddress', 45, $this->mAddress );
170170 // Why to block them
171 - $fields['globalblocking-block-reason'] = wfInput( 'wpReason', 45, $this->mReason );
 171+ $fields['globalblocking-block-reason'] = Xml::input( 'wpReason', 45, $this->mReason );
172172
173173 // How long to block them for
174174 if ( ( $dropdown = wfMsgNoTrans( 'globalblocking-expiry-options' ) ) != '-') {
@@ -179,17 +179,17 @@
180180 }
181181
182182 if ($dropdown == false ) {
183 - $fields['globalblocking-block-expiry'] = wfInput( 'wpExpiry', 45, $this->mExpiry );
 183+ $fields['globalblocking-block-expiry'] = Xml::input( 'wpExpiry', 45, $this->mExpiry );
184184 } else {
185185 $fields['globalblocking-block-expiry'] = $this->buildExpirySelector( 'wpExpiry', 'wpExpiry', $this->mExpirySelection, $dropdown );
186 - $fields['globalblocking-block-expiry-otherfield'] = wfInput( 'wpExpiryOther', 45, $this->mExpiry == $this->mExpirySelection ? '' : $this->mExpiry );
 186+ $fields['globalblocking-block-expiry-otherfield'] = Xml::input( 'wpExpiryOther', 45, $this->mExpiry == $this->mExpirySelection ? '' : $this->mExpiry );
187187 }
188188
189189 // Block all users, or just anonymous ones
190 - $fields['globalblocking-block-options'] = wfCheckLabel( wfMsg( 'ipbanononly' ), 'wpAnonOnly', 'wpAnonOnly', $this->mAnonOnly );
 190+ $fields['globalblocking-block-options'] = Xml::checkLabel( wfMsg( 'ipbanononly' ), 'wpAnonOnly', 'wpAnonOnly', $this->mAnonOnly );
191191
192192 // Build a form.
193 - $form .= wfBuildForm( $fields, 'globalblocking-block-submit' );
 193+ $form .= Xml::buildForm( $fields, 'globalblocking-block-submit' );
194194
195195 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
196196
Index: trunk/extensions/ProfileMonitor/ProfileMonitor.class.php
@@ -41,11 +41,11 @@
4242
4343 private function makeSearchForm( $process, $wild = false ) {
4444 $self = Title::makeTitle( NS_SPECIAL, 'Profiling' );
45 - $html = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
 45+ $html = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
4646 $html .= '<table><tr><td>' . wfMsgHtml( 'profiling-process' ) . '</td><td>';
47 - $html .= wfInput( 'process', 50, $process ) . '</td></tr><td align="right">' . wfCheck( 'wildcard', $wild ) . '</td>';
 47+ $html .= Xml::input( 'process', 50, $process ) . '</td></tr><td align="right">' . Xml::check( 'wildcard', $wild ) . '</td>';
4848 $html .= '<td>' . wfMsgHtml( 'profiling-wildcard' ) . '</td></tr>';
49 - $html .= '<tr><td>&nbsp;</td><td>' . wfSubmitButton( wfMsg( 'profiling-ok' ), array( 'name' => 'submit' ) ) . '</td></table></form>';
 49+ $html .= '<tr><td>&nbsp;</td><td>' . Xml::submitButton( wfMsg( 'profiling-ok' ), array( 'name' => 'submit' ) ) . '</td></table></form>';
5050 return $html;
5151 }
5252

Status & tagging log