r94473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94472‎ | r94473 | r94474 >
Date:19:47, 14 August 2011
Author:reedy
Status:resolved
Tags:
Comment:
Made Xml::buildTable() wrap header stuff in <thead></thead>
Modified paths:
  • /trunk/phase3/includes/Xml.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Xml.php
@@ -794,6 +794,8 @@
795795 $s = Xml::openElement( 'table', $attribs );
796796
797797 if ( is_array( $headers ) ) {
 798+ $s = Xml::openElement( 'thead', $attribs );
 799+
798800 foreach( $headers as $id => $header ) {
799801 $attribs = array();
800802
@@ -803,6 +805,7 @@
804806
805807 $s .= Xml::element( 'th', $attribs, $header );
806808 }
 809+ $s = Xml::closeElement( 'thead' );
807810 }
808811
809812 foreach( $rows as $id => $row ) {
@@ -822,8 +825,8 @@
823826
824827 /**
825828 * Build a row for a table
826 - * @param $attribs An array of attributes to apply to the tr tag
827 - * @param $cells An array of strings to put in <td>
 829+ * @param $attribs array An array of attributes to apply to the tr tag
 830+ * @param $cells array An array of strings to put in <td>
828831 * @return string
829832 */
830833 public static function buildTableRow( $attribs, $cells ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r94475Fix fail from r94473...reedy19:50, 14 August 2011

Status & tagging log