Easier method (and to check existence in correct language)
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Jan 2011 15:50:34 +0000 (15:50 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Jan 2011 15:50:34 +0000 (15:50 +0000)
includes/parser/Parser.php

index 0ef79c9..a6fe0a9 100644 (file)
@@ -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 );