r76949 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76948‎ | r76949 | r76950 >
Date:17:47, 18 November 2010
Author:huji
Status:ok
Tags:
Comment:
Using XML methods rather than hard-coded HTML, as suggested by Aaron in bug 24411.
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -163,16 +163,19 @@
164164 '|' . wfMsg( 'checkuser-showlog' ) . ']]'
165165 );
166166 }
167 - // FIXME: use more Xml/Html methods
168 - $form = "<form name='checkuserform' id='checkuserform' action=\"$action\" method='post'>";
 167+
 168+ $form = Xml::openElement( 'form', array ( 'action' => $action, 'name' => 'checkuserform', 'id' => 'checkuserform', 'method' => 'post' ) );
169169 $form .= '<fieldset><legend>' . wfMsgHtml( 'checkuser-query' ) . '</legend>';
170 - $form .= '<table border="0" cellpadding="2"><tr>';
 170+ $form .= Xml::openElement( 'table', array( 'border' => '0', 'cellpadding' => '2' ) );
 171+ $form .= '<tr>';
171172 $form .= '<td>' . wfMsgHtml( 'checkuser-target' ) . '</td>';
172173 $form .= '<td>' . Xml::input( 'user', 46, $user, array( 'id' => 'checktarget' ) );
173174 $form .= '&#160;' . $this->getPeriodMenu( $period ) . '</td>';
174175 $form .= '</tr><tr>';
175 - $form .= '<td></td><td class="checkuserradios"><table border="0" cellpadding="3"><tr>';
176 - $form .= '<td>' . Xml::radio( 'checktype', 'subuserips', $encuserips, array( 'id' => 'subuserips' ) );
 176+ $form .= '<td></td>';
 177+ $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' ) );
177180 $form .= ' ' . Xml::label( wfMsg( 'checkuser-ips' ), 'subuserips' ) . '</td>';
178181 $form .= '<td>' . Xml::radio( 'checktype', 'subedits', $encedits, array( 'id' => 'subedits' ) );
179182 $form .= ' ' . Xml::label( wfMsg( 'checkuser-edits' ), 'subedits' ) . '</td>';

Follow-up revisions

RevisionCommit summaryAuthorDate
r76950Merging from r76909 thru r76949 of trunkawjrichards18:32, 18 November 2010

Status & tagging log