Fixed bug with magic word fallback to en
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 29 May 2004 01:41:00 +0000 (01:41 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 29 May 2004 01:41:00 +0000 (01:41 +0000)
languages/Language.php
languages/LanguageCy.php

index 90c6ec1..9ccfd5a 100644 (file)
@@ -1770,7 +1770,7 @@ class Language {
        function getMessage( $key )
        {
                global $wgAllMessagesEn;
-               return $wgAllMessagesEn[$key];
+               return @$wgAllMessagesEn[$key];
        }
        
        function getAllMessages()
@@ -1877,7 +1877,7 @@ class Language {
        function getMagic( &$mw )
        {
                $raw =& $this->getMagicWords(); 
-               if( !isset( $raw[$mw->mld] ) ) {
+               if( !isset( $raw[$mw->mId] ) ) {
                        # Fall back to English if local list is incomplete
                        $raw =& Language::getMagicWords();
                }
index eb54828..5c773e5 100644 (file)
@@ -1119,7 +1119,7 @@ class LanguageCy extends LanguageUtf8 {
        function getMessage( $key )
        {
                global $wgAllMessagesCy;
-               return $wgAllMessagesCy[$key];
+               return @$wgAllMessagesCy[$key];
        }
        
        function getAllMessages()