MediaWiki r35908 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r35907‎ | r35908 (on ViewVC)‎ | r35909 >
Date:04:15, 5 June 2008
Author:demon
Status:old
Tags:
Comment:
(bug 12859) Deprecate $wgRateLimitsExcludedGroups in favor of adding the 'noratelimit' user right. Doing it properly this time, so old functionality is still intact.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php	(revision 35907)
+++ trunk/phase3/includes/User.php	(revision 35908)
@@ -1102,7 +1102,13 @@
 	 */
 	public function isPingLimitable() {
 		global $wgRateLimitsExcludedGroups;
-		return array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) == array();
+		if ( array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) == array() || 
+			!$this->isAllowed('noratelimit') ) {
+				return true;
+			}
+		else {
+			return false;
+		}
 	}
 
 	/**
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 35907)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 35908)
@@ -1140,10 +1140,12 @@
 $wgGroupPermissions['sysop']['suppressredirect'] = true;
 $wgGroupPermissions['sysop']['apihighlimits']    = true;
 $wgGroupPermissions['sysop']['browsearchive']    = true;
+$wgGroupPermissions['sysop']['noratelimit']      = true;
 #$wgGroupPermissions['sysop']['mergehistory']     = true;
 
 // Permission to change users' group assignments
 $wgGroupPermissions['bureaucrat']['userrights']  = true;
+$wgGroupPermissions['bureaucrat']['noratelimit'] = true;
 // Permission to change users' groups assignments across wikis
 #$wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
 
@@ -2848,9 +2850,15 @@
 
 /**
  * Array of groups which should never trigger the rate limiter
+ * 
+ * @deprecated as of 1.13.0, the preferred method is using
+ *  $wgGroupPermissions[]['noratelimit']. However, this will still
+ *  work if desired.
+ *  
+ *  $wgRateLimitsExcludedGroups = array( 'sysop', 'bureaucrat' );
  */
-$wgRateLimitsExcludedGroups = array( 'sysop', 'bureaucrat' );
 
+
 /**
  * On Special:Unusedimages, consider images "used", if they are put
  * into a category. Default (false) is not to count those as used.
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 35907)
+++ trunk/phase3/RELEASE-NOTES	(revision 35908)
@@ -52,6 +52,8 @@
 * $wgActiveUserEditCount sets the number of edits that must be performed over
   a certain number of days to be considered active
 * $wgActiveUserDays is that number of days
+* $wgRateLimitsExcludedGroups has been deprecated in favor of 
+  $wgGroupPermissions[]['noratelimit']. The former still works, however.
 
 === New features in 1.13 ===
 
@@ -335,6 +337,8 @@
 * (bug 14386) Fix subpage namespace oddity when moving a talk page
 * (bug 11771) Signup form now not shown if in read-only mode.
 * (bug 10080) Users can now modify an existing block without unblocking first.
+* (bug 12859) $wgRateLimitsExcludedGroups has been deprecated in favor of
+  $wgGroupPermissions[]['noratelimit']. 
 
 === API changes in 1.13 ===
 

Follow-up revisions

Rev.Commit summaryAuthorDate
r35970* (bug 14424) Fix regression in $wgRateLimitsExcludedGroups support...brion15:53, 6 June 2008

Status & tagging log

  • 15:27, 12 September 2011 Meno25 (Talk | contribs) changed the status of r35908 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox