r76951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76950‎ | r76951 | r76952 >
Date:18:56, 18 November 2010
Author:aaron
Status:ok
Tags:
Comment:
* Added closeElement in places for code symmetry
* Fixed validation errors (deprecations of table border attrib)
* Broke long lines
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -163,10 +163,11 @@
164164 '|' . wfMsg( 'checkuser-showlog' ) . ']]'
165165 );
166166 }
167 -
168 - $form = Xml::openElement( 'form', array ( 'action' => $action, 'name' => 'checkuserform', 'id' => 'checkuserform', 'method' => 'post' ) );
 167+
 168+ $form = Xml::openElement( 'form', array( 'action' => $action,
 169+ 'name' => 'checkuserform', 'id' => 'checkuserform', 'method' => 'post' ) );
169170 $form .= '<fieldset><legend>' . wfMsgHtml( 'checkuser-query' ) . '</legend>';
170 - $form .= Xml::openElement( 'table', array( 'border' => '0', 'cellpadding' => '2' ) );
 171+ $form .= Xml::openElement( 'table', array( 'style' => 'border:0' ) );
171172 $form .= '<tr>';
172173 $form .= '<td>' . wfMsgHtml( 'checkuser-target' ) . '</td>';
173174 $form .= '<td>' . Xml::input( 'user', 46, $user, array( 'id' => 'checktarget' ) );
@@ -174,20 +175,30 @@
175176 $form .= '</tr><tr>';
176177 $form .= '<td></td>';
177178 $form .= Xml::openElement('td', array( 'class' => 'checkuserradios' ) );
178 - $form .= Xml::openElement( 'table', array( 'border' => '0', 'cellpadding' => '3' ) );
179 - $form .= '<tr><td>' . Xml::radio( 'checktype', 'subuserips', $encuserips, array( 'id' => 'subuserips' ) );
 179+ $form .= Xml::openElement( 'table', array( 'style' => 'border:0' ) );
 180+ $form .= '<tr>';
 181+ $form .= '<td>' .
 182+ Xml::radio( 'checktype', 'subuserips', $encuserips, array( 'id' => 'subuserips' ) );
180183 $form .= ' ' . Xml::label( wfMsg( 'checkuser-ips' ), 'subuserips' ) . '</td>';
181 - $form .= '<td>' . Xml::radio( 'checktype', 'subedits', $encedits, array( 'id' => 'subedits' ) );
 184+ $form .= '<td>' .
 185+ Xml::radio( 'checktype', 'subedits', $encedits, array( 'id' => 'subedits' ) );
182186 $form .= ' ' . Xml::label( wfMsg( 'checkuser-edits' ), 'subedits' ) . '</td>';
183 - $form .= '<td>' . Xml::radio( 'checktype', 'subipusers', $encipusers, array( 'id' => 'subipusers' ) );
 187+ $form .= '<td>' .
 188+ Xml::radio( 'checktype', 'subipusers', $encipusers, array( 'id' => 'subipusers' ) );
184189 $form .= ' ' . Xml::label( wfMsg( 'checkuser-users' ), 'subipusers' ) . '</td>';
185 - $form .= '</tr></table></td>';
 190+ $form .= '</tr>';
 191+ $form .= Xml::closeElement( 'table' );
 192+ $form .= Xml::closeElement( 'td' );
186193 $form .= '</tr><tr>';
187194 $form .= '<td>' . wfMsgHtml( 'checkuser-reason' ) . '</td>';
188 - $form .= '<td>' . Xml::input( 'reason', 46, $reason, array( 'maxlength' => '150', 'id' => 'checkreason' ) );
 195+ $form .= '<td>' . Xml::input( 'reason', 46, $reason,
 196+ array( 'maxlength' => '150', 'id' => 'checkreason' ) );
189197 $form .= '&#160; &#160;' . Xml::submitButton( wfMsg( 'checkuser-check' ),
190198 array( 'id' => 'checkusersubmit', 'name' => 'checkusersubmit' ) ) . '</td>';
191 - $form .= '</tr></table></fieldset></form>';
 199+ $form .= '</tr>';
 200+ $form .= Xml::closeElement( 'table' );
 201+ $form .= '</fieldset>';
 202+ $form .= Xml::closeElement( 'form' );
192203 # Output form
193204 $wgOut->addHTML( $form );
194205 }

Status & tagging log