recentchanges.rc_ip is used for retroactive autoblocks
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 4 Jan 2013 19:58:00 +0000 (20:58 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 4 Jan 2013 19:58:00 +0000 (20:58 +0100)
Document this at $wgPutIPinRC and check the global explicit

Change-Id: I5a796edc855ae954ebd0fb11fe54b486e5eff7ed

includes/Block.php
includes/DefaultSettings.php

index 5f9be30..afacc43 100644 (file)
@@ -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' );
index fdbcaa7..9cb1e00 100644 (file)
@@ -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;