Thank you for your help! I was able to implement this exactly as planned.
~ Jason
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Platonides Sent: Thursday, July 26, 2007 12:06 PM To: mediawiki-l@lists.wikimedia.org Subject: Re: [Mediawiki-l] v1.10.1 - Namespace Protection
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
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.