From: umherirrender Date: Fri, 4 Jan 2013 19:58:00 +0000 (+0100) Subject: recentchanges.rc_ip is used for retroactive autoblocks X-Git-Tag: 1.31.0-rc.0~21139^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=8b948fc6e6bf3ca658536dddb360ec5983ce8a54;p=lhc%2Fweb%2Fwiklou.git recentchanges.rc_ip is used for retroactive autoblocks Document this at $wgPutIPinRC and check the global explicit Change-Id: I5a796edc855ae954ebd0fb11fe54b486e5eff7ed --- diff --git a/includes/Block.php b/includes/Block.php index 5f9be3099c..afacc43aa2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -576,6 +576,13 @@ class Block { * @return Array: block IDs of retroactive autoblocks made */ protected static function defaultRetroactiveAutoblock( Block $block, array &$blockIds ) { + global $wgPutIPinRC; + + // No IPs are in recentchanges table, so nothing to select + if( !$wgPutIPinRC ) { + return; + } + $dbr = wfGetDB( DB_SLAVE ); $options = array( 'ORDER BY' => 'rc_timestamp DESC' ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fdbcaa7615..9cb1e008ed 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4291,6 +4291,7 @@ $wgRateLimitsExcludedIPs = array(); /** * Log IP addresses in the recentchanges table; can be accessed only by * extensions (e.g. CheckUser) or a DB admin + * Used for retroactive autoblocks */ $wgPutIPinRC = true;