r85600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85599‎ | r85600 | r85601 >
Date:00:32, 7 April 2011
Author:reedy
Status:resolved
Tags:
Comment:
* (bug 22984) add local language name to Special:SiteMatrix

Apply Priyankas patch, with few minor tweaks (mainly whitespace)
Modified paths:
  • /trunk/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php
@@ -359,8 +359,13 @@
360360 if( isset( $localLanguageNames[$lang] ) ) {
361361 $attribs['title'] = $localLanguageNames[$lang];
362362 }
363 - $s .= '<td>' . $anchor . Xml::element( 'strong', $attribs, $wgLanguageNames[$lang] ) . '</td>';
364363
 364+ $langDisplay = $wgLanguageNames[$lang];
 365+ if ( strlen( $localLanguageNames[$lang] ) && $langDisplay != $localLanguageNames[$lang] ) {
 366+ $langDisplay .= ' (' . $localLanguageNames[$lang] . ')';
 367+ }
 368+ $s .= '<td>' . $anchor . Xml::element( 'strong', $attribs, $langDisplay ) . '</td>';
 369+
365370 foreach ( $matrix->getNames() as $site => $name ) {
366371 $url = $matrix->getUrl( $lang, $site );
367372 if ( $matrix->exist( $lang, $site ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r88964Fix for r85600: added isset() checks, otherwise it throws notices when not us...ialex10:41, 27 May 2011

Status & tagging log