Makes Language::getLanguageNames static (strict standards)
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 22:03:49 +0000 (22:03 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 22:03:49 +0000 (22:03 +0000)
includes/SpecialPreferences.php
languages/Language.php

index 1fb9d5e..813afec 100644 (file)
@@ -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;
                }
index 493b6a0..2eaa7ab 100644 (file)
@@ -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;