Index: trunk/phase3/languages/Language.php |
— | — | @@ -1740,25 +1740,19 @@ |
1741 | 1741 | if ( !isset($aliases['en']) ) |
1742 | 1742 | throw new MWException( 'Malformed aliases file' ); |
1743 | 1743 | |
| 1744 | + // Merge all aliases in fallback chain |
1744 | 1745 | $code = $this->getCode(); |
| 1746 | + do { |
| 1747 | + if ( !isset($aliases[$code]) ) continue; |
1745 | 1748 | |
1746 | | - if ( isset($aliases[$code]) ) { |
1747 | 1749 | $aliases[$code] = $this->fixSpecialPageAliases( $aliases[$code] ); |
1748 | 1750 | /* Merge the aliases, THIS will break if there is special page name |
1749 | 1751 | * which looks like a numerical key, thanks to PHP... |
1750 | 1752 | * See the comments for wfArrayMerge in GlobalSettings.php. */ |
1751 | 1753 | $this->mExtendedSpecialPageAliases = array_merge_recursive( |
1752 | 1754 | $this->mExtendedSpecialPageAliases, $aliases[$code] ); |
1753 | | - } |
1754 | 1755 | |
1755 | | - /* Add the English aliases to the end of list as aliases... unless we |
1756 | | - * already added them! */ |
1757 | | - if ( $code !== 'en' ) { |
1758 | | - $aliases['en'] = $this->fixSpecialPageAliases( $aliases['en'] ); |
1759 | | - $this->mExtendedSpecialPageAliases = array_merge_recursive( |
1760 | | - $this->mExtendedSpecialPageAliases, $aliases['en'] ); |
1761 | | - } |
1762 | | - |
| 1756 | + } while ( $code = self::getFallbackFor( $code ) ); |
1763 | 1757 | } |
1764 | 1758 | |
1765 | 1759 | wfRunHooks( 'LanguageGetSpecialPageAliases', |