Extension:Whitelist Namespaces

What can this extension do?
If you have a private wiki, this extension can be used to make a namespace public. This is very similar to Manual:$wgWhitelistRead just it works on entire namespaces instead. I noticed there seemed to be a lot of user authorization extensions, but they seemed to be much more complicated than they needed to be. Please note this is my first extension, its fairly simple, but its quite possible I made a mistake somewhere, so ymmv. Please also read Security issues with authorization extensions before using this extension.

Note: If you have any comments, questions, suggestions etc, please don't hesitate to contact me. (on my talk or by email).

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

You must also make the wiki private, so there is something to whitelist (ex: add  to LocalSettings.php)

Configuration parameters
- array of namespace numbers to whitelist. Examples:
 * #this would whitelist the main, talk and help namespaces
 * #this would whitelist the first custom namespace, and its associated talk namespace.
 * If you have defined a constant &mdash;