$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->resultObject( $dbr->select( 'ipblocks', '*',
array( 'ipb_id' => $id ), __METHOD__ ) );
- $block = new Block;
+ $block = new Block();
if ( $block->loadFromResult( $res ) ) {
return $block;
} else {
if ( $user && $this->mAnonOnly ) {
# Block is marked anon-only
# Whitelist this IP address against autoblocks and range blocks
- $this->clear();
+ if( !$this->mCreateAccount ) {
+ $this->clear(); // bug 13611 - keep this data
+ }
return false;
} else {
return true;
# Try range block
if ( $this->loadRange( $address, $killExpired, $user ) ) {
if ( $user && $this->mAnonOnly ) {
- $this->clear();
+ if( !$this->mCreateAccount ) {
+ $this->clear(); // bug 13611 - keep this data
+ }
return false;
} else {
return true;
$this->spreadBlock();
}
} else {
- $this->mBlock = null;
- wfDebug( __METHOD__.": No block.\n" );
+ // Bug 13611, apply account creation blocks to users.
+ // Note that the existence of $this->mBlock is not used
+ // to check for edit blocks, $this->mBlockedby is instead.
+ # $this->mBlock = null;
}
# Proxy blocking