From: Zheng Zhu Date: Mon, 13 Dec 2004 02:14:31 +0000 (+0000) Subject: Call the correct message function in the language object depending on whether the... X-Git-Tag: 1.5.0alpha1~1096 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=cc7c4cd74c7714a288d5a8defaf2fc1681ee380c;p=lhc%2Fweb%2Fwiklou.git Call the correct message function in the language object depending on whether the language object is used for UI or content. This should fix the problem with date formatting in signatures. --- diff --git a/languages/Language.php b/languages/Language.php index 87c67c30bf..080ab49014 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1743,8 +1743,11 @@ class Language { } function getMonthName( $key ) { - global $wgMonthNamesEn; - return wfMsg($wgMonthNamesEn[$key-1]); + global $wgMonthNamesEn, $wgContLang; + if( get_class( $wgContLang ) == get_class( $this ) ) + return wfMsgForContent($wgMonthNamesEn[$key-1]); + else + return wfMsg($wgMonthNamesEn[$key-1]); } /* by default we just return base form */ @@ -1753,13 +1756,19 @@ class Language { } function getMonthAbbreviation( $key ) { - global $wgMonthAbbreviationsEn; - return wfMsg(@$wgMonthAbbreviationsEn[$key-1]); + global $wgMonthAbbreviationsEn, $wgContLang; + if( get_class( $wgContLang ) == get_class( $this ) ) + return wfMsgForContent(@$wgMonthAbbreviationsEn[$key-1]); + else + return wfMsg(@$wgMonthAbbreviationsEn[$key-1]); } function getWeekdayName( $key ) { - global $wgWeekdayNamesEn; - return wfMsg($wgWeekdayNamesEn[$key-1]); + global $wgWeekdayNamesEn, $wgContLang; + if( get_class( $wgContLang ) == get_class( $this ) ) + return wfMsgForContent($wgWeekdayNamesEn[$key-1]); + else + return wfMsg($wgWeekdayNamesEn[$key-1]); } function userAdjust( $ts ) {