From: Alexandre Emsenhuber Date: Wed, 5 Jan 2011 15:50:34 +0000 (+0000) Subject: Easier method (and to check existence in correct language) X-Git-Tag: 1.31.0-rc.0~32808 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=86d7eeb4d337aa0f34b597b433b12c9c70dd543b;p=lhc%2Fweb%2Fwiklou.git Easier method (and to check existence in correct language) --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 0ef79c9a4b..a6fe0a972b 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4097,9 +4097,9 @@ class Parser { # whatever crap the system uses, localised or not, so we cannot # ship premade translations. $key = 'timezone-' . strtolower( trim( $tzMsg ) ); - $value = wfMsgForContent( $key ); - if ( !wfEmptyMsg( $key, $value ) ) { - $tzMsg = $value; + $msg = wfMessage( $key )->inContentLanguage(); + if ( $msg->exists() ) { + $tzMsg = $msg->text(); } date_default_timezone_set( $oldtz );