Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3205,6 +3205,16 @@ |
3206 | 3206 | $wgRateLimitsExcludedGroups = array(); |
3207 | 3207 | |
3208 | 3208 | /** |
| 3209 | + * Array of IPs which should never trigger the rate limiter. |
| 3210 | + * Really this is a cruddy hack and should be replaced with |
| 3211 | + * an "anti-block" or something which can be managed through |
| 3212 | + * the wiki UI. |
| 3213 | + * |
| 3214 | + * $wgRateLimitsExcludedIPs = array( '1.2.3.4' ); |
| 3215 | + */ |
| 3216 | +$wgRateLimitsExcludedIPs = array(); |
| 3217 | + |
| 3218 | +/** |
3209 | 3219 | * On Special:Unusedimages, consider images "used", if they are put |
3210 | 3220 | * into a category. Default (false) is not to count those as used. |
3211 | 3221 | */ |
Index: trunk/phase3/includes/User.php |
— | — | @@ -1146,10 +1146,17 @@ |
1147 | 1147 | */ |
1148 | 1148 | public function isPingLimitable() { |
1149 | 1149 | global $wgRateLimitsExcludedGroups; |
| 1150 | + global $wgRateLimitsExcludedIPs; |
1150 | 1151 | if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) { |
1151 | 1152 | // Deprecated, but kept for backwards-compatibility config |
1152 | 1153 | return false; |
1153 | 1154 | } |
| 1155 | + if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) { |
| 1156 | + // No other good way currently to disable rate limits |
| 1157 | + // for specific IPs. :P |
| 1158 | + // But this is a crappy hack and should die. |
| 1159 | + return false; |
| 1160 | + } |
1154 | 1161 | return !$this->isAllowed('noratelimit'); |
1155 | 1162 | } |
1156 | 1163 | |