From e1d42d51063f4dde8b485f7bcd5fd243d5cc15d0 Mon Sep 17 00:00:00 2001 From: Nimish Gautam Date: Fri, 4 Sep 2009 23:18:16 +0000 Subject: [PATCH] Can now pass in element attributes other than just id to buildTable functions --- includes/Xml.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/Xml.php b/includes/Xml.php index 88bbadc0bb..1540b95221 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -696,12 +696,14 @@ 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' ); @@ -718,6 +720,7 @@ 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' ); -- 2.20.1