From 8b948fc6e6bf3ca658536dddb360ec5983ce8a54 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 4 Jan 2013 20:58:00 +0100 Subject: [PATCH] recentchanges.rc_ip is used for retroactive autoblocks Document this at $wgPutIPinRC and check the global explicit Change-Id: I5a796edc855ae954ebd0fb11fe54b486e5eff7ed --- includes/Block.php | 7 +++++++ includes/DefaultSettings.php | 1 + 2 files changed, 8 insertions(+) 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; -- 2.20.1