From: Sam Reed Date: Sun, 14 Aug 2011 19:47:44 +0000 (+0000) Subject: Made Xml::buildTable() wrap header stuff in X-Git-Tag: 1.31.0-rc.0~28272 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=8a42c19f417a886b6f7f3c0f63b10d6996f88553;p=lhc%2Fweb%2Fwiklou.git Made Xml::buildTable() wrap header stuff in --- diff --git a/includes/Xml.php b/includes/Xml.php index c48863f803..f937003289 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -794,6 +794,8 @@ class Xml { $s = Xml::openElement( 'table', $attribs ); if ( is_array( $headers ) ) { + $s = Xml::openElement( 'thead', $attribs ); + foreach( $headers as $id => $header ) { $attribs = array(); @@ -803,6 +805,7 @@ class Xml { $s .= Xml::element( 'th', $attribs, $header ); } + $s = Xml::closeElement( 'thead' ); } foreach( $rows as $id => $row ) { @@ -822,8 +825,8 @@ class Xml { /** * Build a row for a table - * @param $attribs An array of attributes to apply to the tr tag - * @param $cells An array of strings to put in + * @param $attribs array An array of attributes to apply to the tr tag + * @param $cells array An array of strings to put in * @return string */ public static function buildTableRow( $attribs, $cells ) {