r79647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79646‎ | r79647 | r79648 >
Date:15:50, 5 January 2011
Author:ialex
Status:ok
Tags:
Comment:
Easier method (and to check existence in correct language)
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -4097,9 +4097,9 @@
40984098 # whatever crap the system uses, localised or not, so we cannot
40994099 # ship premade translations.
41004100 $key = 'timezone-' . strtolower( trim( $tzMsg ) );
4101 - $value = wfMsgForContent( $key );
4102 - if ( !wfEmptyMsg( $key, $value ) ) {
4103 - $tzMsg = $value;
 4101+ $msg = wfMessage( $key )->inContentLanguage();
 4102+ if ( $msg->exists() ) {
 4103+ $tzMsg = $msg->text();
41044104 }
41054105
41064106 date_default_timezone_set( $oldtz );

Status & tagging log