Index: trunk/phase3/includes/User.php |
— | — | @@ -1219,11 +1219,18 @@ |
1220 | 1220 | */ |
1221 | 1221 | public function isPingLimitable() { |
1222 | 1222 | global $wgRateLimitsExcludedGroups; |
| 1223 | + global $wgRateLimitsExcludedIPs; |
1223 | 1224 | if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) { |
1224 | 1225 | // Deprecated, but kept for backwards-compatibility config |
1225 | 1226 | return false; |
1226 | 1227 | } |
1227 | | - return !$this->isAllowed( 'noratelimit' ); |
| 1228 | + if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) { |
| 1229 | + // No other good way currently to disable rate limits |
| 1230 | + // for specific IPs. :P |
| 1231 | + // But this is a crappy hack and should die. |
| 1232 | + return false; |
| 1233 | + } |
| 1234 | + return !$this->isAllowed('noratelimit'); |
1228 | 1235 | } |
1229 | 1236 | |
1230 | 1237 | /** |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3582,6 +3582,12 @@ |
3583 | 3583 | $wgRateLimitsExcludedGroups = array(); |
3584 | 3584 | |
3585 | 3585 | /** |
| 3586 | + * Array of IPs which should be excluded from rate limits. |
| 3587 | + * This may be useful for whitelisting NAT gateways for conferences, etc. |
| 3588 | + */ |
| 3589 | +$wgRateLimitsExcludedIPs = array(); |
| 3590 | + |
| 3591 | +/** |
3586 | 3592 | * On Special:Unusedimages, consider images "used", if they are put |
3587 | 3593 | * into a category. Default (false) is not to count those as used. |
3588 | 3594 | */ |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -252,6 +252,8 @@ |
253 | 253 | * Rewrote Special:Upload to allow easier extension. |
254 | 254 | * Upload errors that can be solved by changing the filename now do not require |
255 | 255 | reuploading. |
| 256 | +* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from |
| 257 | + rate limits. |
256 | 258 | |
257 | 259 | === Bug fixes in 1.16 === |
258 | 260 | |