Index: trunk/extensions/InterwikiList/InterwikiList_body.php |
— | — | @@ -54,21 +54,16 @@ |
55 | 55 | Xml::closeElement( 'form' ); |
56 | 56 | $text = Xml::fieldSet( wfMsg('interwikilist-filter'), $form ); |
57 | 57 | |
58 | | - $text .= Xml::openElement( 'table', array( 'id' => 'sv-software' ) ) . |
59 | | - Xml::openElement( 'tr' ) . |
60 | | - Xml::element( 'th', null, wfMsg( 'interwikilist-linkname' ) ) . |
61 | | - Xml::element( 'th', null, wfMsg( 'interwikilist-target' ) ) . |
62 | | - Xml::closeElement( 'tr' );; |
63 | | - |
64 | | - while ( $row = $dbr->fetchObject( $results ) ) { |
65 | | - $text .= Xml::openElement( 'tr' ) . |
66 | | - Xml::element( 'td', null, $row->iw_prefix ) . |
67 | | - Xml::element( 'td', null, $row->iw_url ) . |
68 | | - Xml::closeElement( 'tr' ); |
| 58 | + $interwikiList = array(); |
| 59 | + while( $row = $dbr->fetchObject( $results ) ) { |
| 60 | + $interwikiList[ "mw-iwlist-" . $row->iw_prefix ] = array( $row->iw_prefix, $row->iw_url ); |
69 | 61 | } |
70 | | - $text .= Xml::closeElement( 'table' ); |
71 | 62 | $dbr->freeResult( $results ); |
72 | 63 | |
| 64 | + $text .= Xml::buildTable( $interwikiList, |
| 65 | + array( 'id' => 'sv-software' ), |
| 66 | + array( wfMsg( 'interwikilist-linkname'), |
| 67 | + wfMsg( 'interwikilist-target' ) ) ); |
73 | 68 | return $text; |
74 | 69 | } |
75 | 70 | } |