| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -985,6 +985,16 @@ |
| 986 | 986 | /** Default variant code, if false, the default will be the language code */ |
| 987 | 987 | $wgDefaultLanguageVariant = false; |
| 988 | 988 | |
| | 989 | +/** Disabled variants array of language variant conversion. |
| | 990 | + * example: |
| | 991 | + * $wgDisabledVariant[] = 'zh-mo'; |
| | 992 | + * $wgDisabledVariant[] = 'zh-my'; |
| | 993 | + * |
| | 994 | + * or: |
| | 995 | + * $wgDisabledVariant = array('zh-mo', 'zh-my'); |
| | 996 | + */ |
| | 997 | +$wgDisabledVariant = array(); |
| | 998 | + |
| 989 | 999 | /** |
| 990 | 1000 | * Show a bar of language selection links in the user login and user |
| 991 | 1001 | * registration forms; edit the "loginlanguagelinks" message to |
| Index: trunk/phase3/languages/LanguageConverter.php |
| — | — | @@ -46,7 +46,7 @@ |
| 47 | 47 | * @param array $manualLevel limit for supported variants |
| 48 | 48 | * @public |
| 49 | 49 | */ |
| 50 | | - function __construct($langobj, $maincode, |
| | 50 | + function __construct( $langobj, $maincode, |
| 51 | 51 | $variants=array(), |
| 52 | 52 | $variantfallbacks=array(), |
| 53 | 53 | $markup=array(), |
| — | — | @@ -54,7 +54,13 @@ |
| 55 | 55 | $manualLevel = array() ) { |
| 56 | 56 | $this->mLangObj = $langobj; |
| 57 | 57 | $this->mMainLanguageCode = $maincode; |
| 58 | | - $this->mVariants = $variants; |
| | 58 | + |
| | 59 | + global $wgDisabledVariants; |
| | 60 | + $this->mVariants = array(); |
| | 61 | + foreach( $variants as $variant ) { |
| | 62 | + if( !in_array( $variant, $wgDisabledVariants ) ) |
| | 63 | + $this->mVariants[] = $variant; |
| | 64 | + } |
| 59 | 65 | $this->mVariantFallbacks = $variantfallbacks; |
| 60 | 66 | global $wgLanguageNames; |
| 61 | 67 | $this->mVariantNames = $wgLanguageNames; |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -128,7 +128,7 @@ |
| 129 | 129 | * DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote |
| 130 | 130 | items) |
| 131 | 131 | * Special:Search now could search terms in all variant-forms. ONLY apply on |
| 132 | | - wikis with LanguageConverter |
| | 132 | + wikis enabled LanguageConverter. |
| 133 | 133 | * Add autopromote condition APCOND_BLOCKED to autopromote blocked users to various |
| 134 | 134 | user groups. |
| 135 | 135 | * Add $wgRevokePermissions as a means of restricting a group's rights. The |
| — | — | @@ -228,6 +228,8 @@ |
| 229 | 229 | * Added $wgUseAJAXCategories allow enabling AJAX based categories system. |
| 230 | 230 | This works on all namespaces. Enabled namespaces can be reduces using |
| 231 | 231 | $wgAJAXCategoriesNamespaces. |
| | 232 | +* Admins could disable some variants using $wgDisabledVariants now. ONLY apply on |
| | 233 | + wikis enabled LanguageConverter. |
| 232 | 234 | |
| 233 | 235 | === Bug fixes in 1.16 === |
| 234 | 236 | |