$options = array();
$db =& $this->getDBOptions( $options );
- $ret = false;
- $killed = false;
-
if ( 0 == $user && $address == '' ) {
# Invalid user specification, not blocked
$this->clear();
$now = wfTimestampNow();
- extract( $db->tableNames( 'ipblocks', 'user' ) );
+ list( $ipblocks, $user ) = $db->tableNamesN( 'ipblocks', 'user' );
$sql = "SELECT $ipblocks.*,user_name FROM $ipblocks,$user " .
"WHERE user_id=ipb_by $cond ORDER BY ipb_timestamp DESC $options";
wfDebug("Doing retroactive autoblocks for " . $this->mAddress . "\n");
$row = $dbr->selectRow( 'recentchanges', array( 'rc_ip' ), array( 'rc_user_text' => $this->mAddress ),
- $fname, array( 'ORDER BY' => 'rc_timestamp DESC' ) );
+ __METHOD__ , array( 'ORDER BY' => 'rc_timestamp DESC' ) );
if ( !$row || !$row->rc_ip ) {
#No results, don't autoblock anything
$wlEntry = substr($line, 1);
$wlEntry = trim($wlEntry);
- wfDebug("Checking $wlEntry\n");
+ wfDebug("Checking $ip against $wlEntry...");
# Is the IP in this range?
if (IP::isInRange( $ip, $wlEntry )) {
- wfDebug("IP $ip matches $wlEntry, not autoblocking\n");
+ wfDebug(" IP $ip matches $wlEntry, not autoblocking\n");
#$autoblockip = null; # Don't autoblock a whitelisted IP.
return; #This /SHOULD/ introduce a dummy block - but
# I don't know a safe way to do so. -werdna
+ } else {
+ wfDebug( " No match\n" );
}
}