From: Niklas Laxström Date: Wed, 2 Jan 2008 19:58:15 +0000 (+0000) Subject: * Made general implementation of convertGrammar general enough, so that subclasses... X-Git-Tag: 1.31.0-rc.0~50175 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=e63b0b6b58f5b836bfe2e68c39eb8373ac4aac2a;p=lhc%2Fweb%2Fwiklou.git * Made general implementation of convertGrammar general enough, so that subclasses don't need to re-implement it just to change code --- diff --git a/languages/Language.php b/languages/Language.php index c65d9aa2df..d9aa5f52f7 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -171,6 +171,7 @@ class Language { * @return array */ function getDefaultUserOptions() { + trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE ); return User::getDefaultOptions(); } @@ -1772,8 +1773,8 @@ class Language { */ function convertGrammar( $word, $case ) { global $wgGrammarForms; - if ( isset($wgGrammarForms['en'][$case][$word]) ) { - return $wgGrammarForms['en'][$case][$word]; + if ( isset($wgGrammarForms[$this->getCode()][$case][$word]) ) { + return $wgGrammarForms[$this->getCode()][$case][$word]; } return $word; }