Merge "registration: Let namespaces specify if they're includable"

This commit is contained in:
jenkins-bot 2021-11-16 00:11:13 +00:00 committed by Gerrit Code Review
commit 967a24d050
3 changed files with 13 additions and 1 deletions

View file

@ -594,6 +594,11 @@
"type": "boolean",
"description": "Whether it is possible to move pages in this namespace",
"default": true
},
"includable": {
"type": "boolean",
"description": "Whether it is possible to include/transclude pages in this namespace",
"default": true
}
},
"required": ["id", "constant", "name"]

View file

@ -625,6 +625,11 @@
"type": "boolean",
"description": "Whether it is possible to move pages in this namespace",
"default": true
},
"includable": {
"type": "boolean",
"description": "Whether it is possible to include/transclude pages in this namespace",
"default": true
}
},
"required": ["id", "constant", "name"]

View file

@ -530,7 +530,9 @@ class ExtensionProcessor implements Processor {
if ( isset( $ns['capitallinkoverride'] ) ) {
$this->globals['wgCapitalLinkOverrides'][$id] = $ns['capitallinkoverride'];
}
if ( isset( $ns['includable'] ) && !$ns['includable'] ) {
$this->globals['wgNonincludableNamespaces'][] = $id;
}
}
}
}