Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1089,6 +1089,10 @@ |
1090 | 1090 | &$result: Set this and return false to override the internal checks |
1091 | 1091 | $user: User the password is being validated for |
1092 | 1092 | |
| 1093 | +'LanguageGetNamespaces': Provide custom ordering for namespaces or |
| 1094 | +remove namespaces. Do not use this hook to add namespaces. |
| 1095 | +&$namespaces: Array of namespaces indexed by their numbers |
| 1096 | + |
1093 | 1097 | 'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in |
1094 | 1098 | $wgExtensionMessagesFiles instead. |
1095 | 1099 | Use this to define synonyms of magic words depending of the language |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -341,6 +341,8 @@ |
342 | 342 | # The above mixing may leave namespaces out of canonical order. |
343 | 343 | # Re-order by namespace ID number... |
344 | 344 | ksort( $this->namespaceNames ); |
| 345 | + |
| 346 | + wfRunHooks( 'LanguageGetNamespaces', array( &$this->namespaceNames ) ); |
345 | 347 | } |
346 | 348 | return $this->namespaceNames; |
347 | 349 | } |
— | — | @@ -3312,7 +3314,7 @@ |
3313 | 3315 | } |
3314 | 3316 | |
3315 | 3317 | /** |
3316 | | - * Get the first fallback for a given language |
| 3318 | + * Get the first fallback for a given language. |
3317 | 3319 | * |
3318 | 3320 | * @param $code string |
3319 | 3321 | * |