From: Antoine Musso Date: Sat, 16 Dec 2006 22:03:49 +0000 (+0000) Subject: Makes Language::getLanguageNames static (strict standards) X-Git-Tag: 1.31.0-rc.0~54874 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=18673ec0e9990e1b6536b1865f6467ef20c01964;p=lhc%2Fweb%2Fwiklou.git Makes Language::getLanguageNames static (strict standards) --- diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 1fb9d5e71f..813afece14 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -591,7 +591,7 @@ class PreferencesForm { * Make sure the site language is in the list; a custom language code * might not have a defined name... */ - $languages = $wgLang->getLanguageNames( true ); + $languages = Language::getLanguageNames( true ); if( !array_key_exists( $wgContLanguageCode, $languages ) ) { $languages[$wgContLanguageCode] = $wgContLanguageCode; } diff --git a/languages/Language.php b/languages/Language.php index 493b6a0dd2..2eaa7ab651 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -306,7 +306,7 @@ class Language { * Get language names, indexed by code. * If $customisedOnly is true, only returns codes with a messages file */ - function getLanguageNames( $customisedOnly = false ) { + public static function getLanguageNames( $customisedOnly = false ) { global $wgLanguageNames; if ( !$customisedOnly ) { return $wgLanguageNames;