r12188 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12187‎ | r12188 | r12189 >
Date:05:14, 21 December 2005
Author:avar
Status:old
Tags:
Comment:
* Support configuring a permission required to view Special:Unwatchedpages
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialUnwatchedpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUnwatchedpages.php
@@ -57,6 +57,11 @@
5858 * constructor
5959 */
6060 function wfSpecialUnwatchedpages() {
 61+ global $wgUser, $wgUnwatchedPagesPermission, $wgOut;
 62+
 63+ if ( ! $wgUser->isAllowed( $wgUnwatchedPagesPermission ) )
 64+ return $wgOut->permissionRequired( $wgUnwatchedPagesPermission );
 65+
6166 list( $limit, $offset ) = wfCheckLimits();
6267
6368 $wpp = new UnwatchedpagesPage();
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1394,6 +1394,12 @@
13951395 */
13961396 $wgEnableUnwatchedpages = false;
13971397
 1398+/**
 1399+ * Users must have this permission to view Special:Unwatchedpages, e.g.
 1400+ * 'protect' for only allowing >sysops. '' for none
 1401+ */
 1402+$wgUnwatchedPagesPermission = '';
 1403+
13981404 /** Allow the "info" action, very inefficient at the moment */
13991405 $wgAllowPageInfo = false;
14001406

Status & tagging log