r35908 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35907‎ | r35908 | 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:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -1102,7 +1102,13 @@
11031103 */
11041104 public function isPingLimitable() {
11051105 global $wgRateLimitsExcludedGroups;
1106 - return array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) == array();
 1106+ if ( array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) == array() ||
 1107+ !$this->isAllowed('noratelimit') ) {
 1108+ return true;
 1109+ }
 1110+ else {
 1111+ return false;
 1112+ }
11071113 }
11081114
11091115 /**
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1140,10 +1140,12 @@
11411141 $wgGroupPermissions['sysop']['suppressredirect'] = true;
11421142 $wgGroupPermissions['sysop']['apihighlimits'] = true;
11431143 $wgGroupPermissions['sysop']['browsearchive'] = true;
 1144+$wgGroupPermissions['sysop']['noratelimit'] = true;
11441145 #$wgGroupPermissions['sysop']['mergehistory'] = true;
11451146
11461147 // Permission to change users' group assignments
11471148 $wgGroupPermissions['bureaucrat']['userrights'] = true;
 1149+$wgGroupPermissions['bureaucrat']['noratelimit'] = true;
11481150 // Permission to change users' groups assignments across wikis
11491151 #$wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
11501152
@@ -2848,9 +2850,15 @@
28492851
28502852 /**
28512853 * Array of groups which should never trigger the rate limiter
 2854+ *
 2855+ * @deprecated as of 1.13.0, the preferred method is using
 2856+ * $wgGroupPermissions[]['noratelimit']. However, this will still
 2857+ * work if desired.
 2858+ *
 2859+ * $wgRateLimitsExcludedGroups = array( 'sysop', 'bureaucrat' );
28522860 */
2853 -$wgRateLimitsExcludedGroups = array( 'sysop', 'bureaucrat' );
28542861
 2862+
28552863 /**
28562864 * On Special:Unusedimages, consider images "used", if they are put
28572865 * into a category. Default (false) is not to count those as used.
Index: trunk/phase3/RELEASE-NOTES
@@ -52,6 +52,8 @@
5353 * $wgActiveUserEditCount sets the number of edits that must be performed over
5454 a certain number of days to be considered active
5555 * $wgActiveUserDays is that number of days
 56+* $wgRateLimitsExcludedGroups has been deprecated in favor of
 57+ $wgGroupPermissions[]['noratelimit']. The former still works, however.
5658
5759 === New features in 1.13 ===
5860
@@ -335,6 +337,8 @@
336338 * (bug 14386) Fix subpage namespace oddity when moving a talk page
337339 * (bug 11771) Signup form now not shown if in read-only mode.
338340 * (bug 10080) Users can now modify an existing block without unblocking first.
 341+* (bug 12859) $wgRateLimitsExcludedGroups has been deprecated in favor of
 342+ $wgGroupPermissions[]['noratelimit'].
339343
340344 === API changes in 1.13 ===
341345

Follow-up revisions

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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35794(bug 12859) Deprecate $wgRateLimitsExcludedGroups in favor of adding the 'nor...demon14:53, 3 June 2008

Status & tagging log