r12196 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r12195 | r12196 (on ViewVC) | r12197 >
Date:13:31, 21 December 2005
Author:avar
Status:new
Tags:
Comment:* Made a new permission for Special:Unwatchedpages, enabled by default for sysops
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 12195)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 12196)
@@ -802,6 +802,7 @@
 $wgGroupPermissions['sysop']['upload']          = true;
 $wgGroupPermissions['sysop']['reupload']        = true;
 $wgGroupPermissions['sysop']['reupload-shared'] = true;
+$wgGroupPermissions['sysop']['unwatchedpages']	= true;
 
 $wgGroupPermissions['bureaucrat']['userrights'] = true;
 
@@ -1388,19 +1389,6 @@
 /** Filter for Special:Randompage. Part of a WHERE clause */
 $wgExtraRandompageSQL = false;
 
-/**
- * Enable the Special:Unwatchedpages special page, turned off by default  since
- * most would consider this privelaged information as it could be used as a
- * list of pages to vandalize.
- */
-$wgEnableUnwatchedpages = false;
-
-/**
- * Users must have this permission to view Special:Unwatchedpages, e.g.
- * 'protect' for only allowing >sysops. '' for none
- */
-$wgUnwatchedPagesPermission = '';
-
 /** Allow the "info" action, very inefficient at the moment */
 $wgAllowPageInfo = false;
 
Index: trunk/phase3/includes/QueryPage.php
===================================================================
--- trunk/phase3/includes/QueryPage.php	(revision 12195)
+++ trunk/phase3/includes/QueryPage.php	(revision 12196)
@@ -38,15 +38,13 @@
 	array( 'UnusedimagesPage',		'Unusedimages'			),
 	array( 'WantedCategoriesPage',		'Wantedcategories'		),
 	array( 'WantedPagesPage',		'Wantedpages'			),
+	array( 'UnwatchedPagesPage',		'Unwatchedpages'		),
 );
 wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
 
 global $wgDisableCounters;
 if ( !$wgDisableCounters )
 	$wgQueryPages[] = array( 'PopularPagesPage',		'Popularpages'		);
-global $wgEnableUnwatchedpages;
-if ( $wgEnableUnwatchedpages )
-	$wgQueryPages[] = array( 'UnwatchedPagesPage',		'Unwatchedpages'	);
 
 
 /**
Index: trunk/phase3/includes/SpecialPage.php
===================================================================
--- trunk/phase3/includes/SpecialPage.php	(revision 12195)
+++ trunk/phase3/includes/SpecialPage.php	(revision 12196)
@@ -76,6 +76,7 @@
 	'Unlockdb'		=> new SpecialPage( 'Unlockdb', 'siteadmin' ),
 	'Userrights'	=> new SpecialPage( 'Userrights', 'userrights' ),
 	'MIMEsearch'    => new SpecialPage( 'MIMEsearch' ),
+	'Unwatchedpages' => new SpecialPage( 'Unwatchedpages', 'unwatchedpages' )
 );
 
 if ( $wgUseValidation )
@@ -93,9 +94,6 @@
 	$wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' );
 }
 
-if ( $wgEnableUnwatchedpages )
-	 $wgSpecialPages['Unwatchedpages'] = new SpecialPage( 'Unwatchedpages' );
-
 /**
  * Parent special page class, also static functions for handling the special
  * page list
Views
Toolbox