r40420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40419‎ | r40420 | r40421 >
Date:06:37, 4 September 2008
Author:tstarling
Status:old
Tags:
Comment:
Ignore invalid titles in $out->getLanguageLinks().
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -413,11 +413,13 @@
414414 $class = 'interwiki-' . $tmp[0];
415415 unset($tmp);
416416 $nt = Title::newFromText( $l );
417 - $language_urls[] = array(
418 - 'href' => $nt->getFullURL(),
419 - 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
420 - 'class' => $class
421 - );
 417+ if ( $nt ) {
 418+ $language_urls[] = array(
 419+ 'href' => $nt->getFullURL(),
 420+ 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
 421+ 'class' => $class
 422+ );
 423+ }
422424 }
423425 }
424426 if(count($language_urls)) {