Revert r55842 "Can now pass in element attributes other than just id to buildTable...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Sep 2009 17:42:02 +0000 (17:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Sep 2009 17:42:02 +0000 (17:42 +0000)
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

includes/Xml.php

index 4929a30..c1b5654 100644 (file)
@@ -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' );