r33830 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33829‎ | r33830 | r33831 >
Date:12:30, 24 April 2008
Author:minuteelectron
Status:old
Tags:
Comment:
* Stop a PHP Notice with a temporary measure, will be properly fixed soon.
* Add an item to the TODO section.
Modified paths:
  • /trunk/extensions/Babel/Babel.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.php
@@ -6,6 +6,9 @@
77 * Adds a parser function to allow automated generation of a babel userbox
88 * column with the ability to include custom templates.
99 *
 10+ * TODO:
 11+ * Supress category for babel level 0.
 12+ *
1013 * @addtogroup Extensions
1114 *
1215 * @link http://www.mediawiki.org/wiki/Extension:Babel
@@ -228,7 +231,13 @@
229232 */
230233 $names = Language::getLanguageNames();
231234
232 - $name = $names[ $code ];
 235+ /* Temporary measure to supress PHP Notice until ISO 639-3
 236+ * to ISO 639-1 correlation is implemented and a system to
 237+ * also try and get messages from CLDR is implemented.
 238+ */
 239+ if( $names[ $code ] ) {
 240+ $name = $names[ $code ];
 241+ }
233242
234243 /* Generate the text displayed on the right hand side of the
235244 * box.

Status & tagging log