Index: trunk/phase3/includes/Xml.php |
— | — | @@ -794,6 +794,8 @@ |
795 | 795 | $s = Xml::openElement( 'table', $attribs ); |
796 | 796 | |
797 | 797 | if ( is_array( $headers ) ) { |
| 798 | + $s = Xml::openElement( 'thead', $attribs ); |
| 799 | + |
798 | 800 | foreach( $headers as $id => $header ) { |
799 | 801 | $attribs = array(); |
800 | 802 | |
— | — | @@ -803,6 +805,7 @@ |
804 | 806 | |
805 | 807 | $s .= Xml::element( 'th', $attribs, $header ); |
806 | 808 | } |
| 809 | + $s = Xml::closeElement( 'thead' ); |
807 | 810 | } |
808 | 811 | |
809 | 812 | foreach( $rows as $id => $row ) { |
— | — | @@ -822,8 +825,8 @@ |
823 | 826 | |
824 | 827 | /** |
825 | 828 | * 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> |
828 | 831 | * @return string |
829 | 832 | */ |
830 | 833 | public static function buildTableRow( $attribs, $cells ) { |