From c402600732ba6a5172ef123e5e6f2a9af0aed4fe Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 1 Aug 2015 01:37:10 -0700 Subject: [PATCH] registration: Allow setting $wgCapitalLinkOverrides Change-Id: Iaf8b44d02adf94ac7f7cb6a8a090b4069b98a88c --- docs/extension.schema.json | 4 ++++ includes/registration/ExtensionProcessor.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/extension.schema.json b/docs/extension.schema.json index 71be7a5561..c9f8e4204d 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -477,6 +477,10 @@ "protection": { "type": ["string", "array"], "description": "Userright(s) required to edit in this namespace" + }, + "capitallinkoverride": { + "type": "boolean", + "description": "Set $wgCapitalLinks on a per-namespace basis" } }, "required": ["id", "constant", "name"] diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 4a0843f1a9..2a998835f7 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -63,6 +63,7 @@ class ExtensionProcessor implements Processor { 'wgNamespacesWithSubpages' => 'array_plus', 'wgNamespaceContentModels' => 'array_plus', 'wgNamespaceProtection' => 'array_plus', + 'wgCapitalLinkOverrides' => 'array_plus', ); /** @@ -227,6 +228,9 @@ class ExtensionProcessor implements Processor { if ( isset( $ns['protection'] ) ) { $this->globals['wgNamespaceProtection'][$id] = $ns['protection']; } + if ( isset( $ns['capitallinkoverride'] ) ) { + $this->globals['wgCapitalLinkOverrides'][$id] = $ns['capitallinkoverride']; + } } } } -- 2.20.1