Jason Spirko wrote:
I added the code as you suggested below. What I have is a custom settings file that I call at the end of the LocalSettings.php file called "xoran_custom.php". I have added your code to the end of this file. But now I receive the following error when accessing the wiki:
Parse error: syntax error, unexpected '}' in C:...\wiki\includes\xoran_custom.php on line 118
Oh, well i coded it directly on the email so it's not too strange...
There're two } before return true (lines 115-116), there should only be one. I see now that "global $wgPrivateNamespaces;" should be "global $wgPrivateNamespaces, $wgPrivateNamespacesRead;" and it's neither initialised (add "$wgPrivateNamespacesRead = array();" below "$wgPrivateNamespaces = array();")
Also, if you're are using $wgNamespaceProtection, remove everything from the else to the line 116 (including the two } but not the } before the else).
Remember that MediaWiki is not designed to restrict reading. Among other things, you will probably want to add the non-readable namespaces to $wgNonincludableNamespaces http://www.mediawiki.org/wiki/Manual:$wgNonincludableNamespaces