Index: trunk/phase3/includes/User.php |
— | — | @@ -1162,10 +1162,17 @@ |
1163 | 1163 | */ |
1164 | 1164 | public function isPingLimitable() { |
1165 | 1165 | global $wgRateLimitsExcludedGroups; |
| 1166 | + global $wgRateLimitsExcludedIPs; |
1166 | 1167 | if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) { |
1167 | 1168 | // Deprecated, but kept for backwards-compatibility config |
1168 | 1169 | return false; |
1169 | 1170 | } |
| 1171 | + if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) { |
| 1172 | + // No other good way currently to disable rate limits |
| 1173 | + // for specific IPs. :P |
| 1174 | + // But this is a crappy hack and should die. |
| 1175 | + return false; |
| 1176 | + } |
1170 | 1177 | return !$this->isAllowed('noratelimit'); |
1171 | 1178 | } |
1172 | 1179 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3260,6 +3260,12 @@ |
3261 | 3261 | $wgRateLimitsExcludedGroups = array(); |
3262 | 3262 | |
3263 | 3263 | /** |
| 3264 | + * Array of IPs which should be excluded from rate limits. |
| 3265 | + * This may be useful for whitelisting NAT gateways for conferences, etc. |
| 3266 | + */ |
| 3267 | +$wgRateLimitsExcludedIPs = array(); |
| 3268 | + |
| 3269 | +/** |
3264 | 3270 | * On Special:Unusedimages, consider images "used", if they are put |
3265 | 3271 | * into a category. Default (false) is not to count those as used. |
3266 | 3272 | */ |
— | — | @@ -3718,4 +3724,4 @@ |
3719 | 3725 | /** |
3720 | 3726 | * Preprocessor caching threshold |
3721 | 3727 | */ |
3722 | | -$wgPreprocessorCacheThreshold = 1000; |
\ No newline at end of file |
| 3728 | +$wgPreprocessorCacheThreshold = 1000; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -106,6 +106,8 @@ |
107 | 107 | * Remove the link to Special:FileDuplicateSearch from the "file history" section |
108 | 108 | of image description pages as the list of duplicated files is shown in the |
109 | 109 | next section anyway. |
| 110 | +* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from |
| 111 | + rate limits. |
110 | 112 | |
111 | 113 | === Bug fixes in 1.15 === |
112 | 114 | * (bug 16968) Special:Upload no longer throws useless warnings. |