From 455799f03fa37dec92f02f30aa59a17fee4b7903 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sun, 6 Aug 2006 18:32:12 +0000 Subject: [PATCH] Don't use global wfMsg in a language file - use Langauge::getMessageFromDB instead. --- languages/Language.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/languages/Language.php b/languages/Language.php index 2a8fb99b4e..ae0c7967cc 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -244,7 +244,7 @@ class Language { * @return string */ function getVariantname( $code ) { - return wfMsg( "variantname-$code" ); + return $this->getMessageFromDB( "variantname-$code" ); } function specialPage( $name ) { @@ -292,7 +292,7 @@ class Language { } function getUserToggle( $tog ) { - return wfMsg( "tog-$tog" ); + return $this->getMessageFromDB( "tog-$tog" ); } /** @@ -320,8 +320,8 @@ class Language { } /** - * Ugly hack to get a message maybe from the MediaWiki namespace, if this - * language object is the content or user language. + * Ugly hack to get a message maybe from the MediaWiki namespace, if this + * language object is the content or user language. */ function getMessageFromDB( $msg ) { global $wgContLang, $wgLang; @@ -1021,7 +1021,7 @@ class Language { if ($i == $m) { $s = $l[$i]; } else if ($i == $m - 1) { - $s = $l[$i] . ' ' . wfMsg('and') . ' ' . $s; + $s = $l[$i] . ' ' . $this->getMessageFromDB( 'and' ) . ' ' . $s; } else { $s = $l[$i] . ', ' . $s; } @@ -1112,7 +1112,7 @@ class Language { */ function translateBlockExpiry( $str ) { - $scBlockExpiryOptions = wfMsg( 'ipboptions' ); + $scBlockExpiryOptions = $this->getMessageFromDB( 'ipboptions' ); if ( $scBlockExpiryOptions == '-') { return $str; -- 2.20.1