Extension:InternalWhitelist

What can this extension do?
For wikis that choose to restrict pages that anonymous users can see, this extension provides the capability of maintaining the "whitelisted" pages from within the MediaWiki application in the MediaWiki namespace. For more information on "whitelisting", please see $wgWhitelistRead.

This extension will actually replace any previously applied settings for $wgWhitelistRead.

Compatibility

 * MediaWiki version 1.11 and higher

Note: This extension utilizes the 'UserGetRights' hook, which was first implemented in MediaWiki version 1.11.

Installation & Setup / Changes to LocalSettings.php
To install this extension: //Whitelisted pages //Subject pages //Discussion pages //Special Pages The lines starting with "//" will be ignored, and the bulleted lines will become an array of whitelisted pages.
 * Save the code below in a file called "InternalWhitelist.php" and place this file in the extensions folder of your MediaWiki installation.
 * Insert the following into your LocalSettings.php file:
 * Create a page titled "MediaWiki:Whitelist". List each page you wish to "whitelist" for anonymous users as a bulleted list.  Comments can be added to the page by preceding each line that is a comment with a double slash ("//") .  For example, to whitelist the Main Page, the discussion page for the Main Page, and the Recent Changes page, you would enter the following content in MediaWiki:Whitelist:
 * Main Page
 * Talk:Main Page
 * Special:RecentChanges

Bug in code
If you receive the following error message after installing this extension on a recent version of MediaWiki: Detected bug in an extension! Hook fnInternalWhitelist failed to return a value; should return true to continue hook processing or false to abort. You can easily fix this issue by replacing the following line: function fnInternalWhitelist(&$user, $rights){ with this: function fnInternalWhitelist($user, $rights){