registration: Allow setting $wgCapitalLinkOverrides
authorKunal Mehta <legoktm@gmail.com>
Sat, 1 Aug 2015 08:37:10 +0000 (01:37 -0700)
committerLegoktm <legoktm.wikipedia@gmail.com>
Sun, 2 Aug 2015 20:29:54 +0000 (20:29 +0000)
Change-Id: Iaf8b44d02adf94ac7f7cb6a8a090b4069b98a88c

docs/extension.schema.json
includes/registration/ExtensionProcessor.php

index 71be7a5..c9f8e42 100644 (file)
                                        "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"]
index 4a0843f..2a99883 100644 (file)
@@ -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'];
+                               }
                        }
                }
        }