From: Brion Vibber Date: Tue, 8 Sep 2009 17:42:02 +0000 (+0000) Subject: Revert r55842 "Can now pass in element attributes other than just id to buildTable... X-Git-Tag: 1.31.0-rc.0~39842 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=cec03907dfcfa8d4fd03e5746e22e66c0fb638d3;p=lhc%2Fweb%2Fwiklou.git Revert r55842 "Can now pass in element attributes other than just id to buildTable functions" Code won't actually work because $id can't be an array, per notes on http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55842#c3882 --- diff --git a/includes/Xml.php b/includes/Xml.php index 4929a30d8f..c1b56544dd 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -699,14 +699,12 @@ class Xml { foreach( $headers as $id => $header ) { $attribs = array(); if ( is_string( $id ) ) $attribs['id'] = $id; - if ( is_array( $id ) ) $attribs = $id; $s .= Xml::element( 'th', $attribs, $header ); } } foreach( $rows as $id => $row ) { $attribs = array(); if ( is_string( $id ) ) $attribs['id'] = $id; - if ( is_array( $id ) ) $attribs = $id; $s .= Xml::buildTableRow( $attribs, $row ); } $s .= Xml::closeElement( 'table' ); @@ -723,7 +721,6 @@ class Xml { foreach( $cells as $id => $cell ) { $attribs = array(); if ( is_string( $id ) ) $attribs['id'] = $id; - if ( is_array( $id ) ) $attribs = $id; $s .= Xml::element( 'td', $attribs, $cell ); } $s .= Xml::closeElement( 'tr' );