From: Kunal Mehta Date: Sat, 1 Aug 2015 07:39:52 +0000 (-0700) Subject: registration: Allow setting $wgNamespaceProtection X-Git-Tag: 1.31.0-rc.0~10547 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=f979d1bfce8196b784e16c2eb02aee7549918b70;p=lhc%2Fweb%2Fwiklou.git registration: Allow setting $wgNamespaceProtection Change-Id: Id071eeeb3e734f7833d36610a6b4e786f2d26fa6 --- diff --git a/docs/extension.schema.json b/docs/extension.schema.json index eef2c0ae14..71be7a5561 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -473,6 +473,10 @@ }, "defaultcontentmodel": { "type": "string" + }, + "protection": { + "type": ["string", "array"], + "description": "Userright(s) required to edit in this namespace" } }, "required": ["id", "constant", "name"] diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index da8600c77a..4a0843f1a9 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -62,6 +62,7 @@ class ExtensionProcessor implements Processor { 'wgExtraGenderNamespaces' => 'array_plus', 'wgNamespacesWithSubpages' => 'array_plus', 'wgNamespaceContentModels' => 'array_plus', + 'wgNamespaceProtection' => 'array_plus', ); /** @@ -223,6 +224,9 @@ class ExtensionProcessor implements Processor { if ( isset( $ns['defaultcontentmodel'] ) ) { $this->globals['wgNamespaceContentModels'][$id] = $ns['defaultcontentmodel']; } + if ( isset( $ns['protection'] ) ) { + $this->globals['wgNamespaceProtection'][$id] = $ns['protection']; + } } } }