If local language's magicwords list is incomplete, try fetching it from the English one
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 28 May 2004 21:20:51 +0000 (21:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 28 May 2004 21:20:51 +0000 (21:20 +0000)
languages/Language.php

index 82adf44..90c6ec1 100644 (file)
@@ -1877,6 +1877,10 @@ class Language {
        function getMagic( &$mw )
        {
                $raw =& $this->getMagicWords(); 
+               if( !isset( $raw[$mw->mld] ) ) {
+                       # Fall back to English if local list is incomplete
+                       $raw =& Language::getMagicWords();
+               }
         $rawEntry = $raw[$mw->mId];
                $mw->mCaseSensitive = $rawEntry[0];
                $mw->mSynonyms = array_slice( $rawEntry, 1 );