r11923 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11922‎ | r11923 | r11924 >
Date:16:14, 3 December 2005
Author:hashar
Status:old
Tags:
Comment:
Implements #3671 : add language names to sitematrix
Modified paths:
  • /trunk/extensions/SiteMatrix.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix.php
@@ -14,6 +14,7 @@
1515 function wfSiteMatrix() {
1616 global $IP;
1717 require_once( $IP.'/includes/SpecialPage.php' );
 18+require_once( $IP.'/languages/Names.php' );
1819
1920 class SiteMatrixPage extends SpecialPage {
2021
@@ -69,14 +70,17 @@
7071
7172 # Header row
7273 $s = '<table><tr>';
 74+ $s .= '<th>Language</th>';
7375 foreach ( $names as $name ) {
74 - $s .= '<td><strong>' . $name . '</strong></td>';
 76+ $s .= '<th>' . $name . '</th>';
7577 }
7678 $s .= "</tr>\n";
7779
 80+ global $wgLanguageNames;
7881 # Bulk of table
7982 foreach ( $langlist as $lang ) {
80 - $s .= "<tr>";
 83+ $s .= '<tr>';
 84+ $s .= '<td><strong>' . $wgLanguageNames[$lang] . '</strong></td>';
8185 $langhost = str_replace( '_', '-', $lang );
8286 foreach ( $names as $site => $name ) {
8387 $url = "http://$langhost." . $hosts[$site] . '/';

Status & tagging log