From: Tim Starling Date: Mon, 10 Jul 2006 08:38:22 +0000 (+0000) Subject: Ignore ipb_anon_only and ipb_create_account for username blocks. X-Git-Tag: 1.31.0-rc.0~56334 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=23f2b6b5c5200e37624b0eccda24d6cdad78d8d3;p=lhc%2Fweb%2Fwiklou.git Ignore ipb_anon_only and ipb_create_account for username blocks. --- diff --git a/includes/Block.php b/includes/Block.php index 7bee08f47f..9a0cf789a2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -24,7 +24,7 @@ class Block const EB_FOR_UPDATE = 2; const EB_RANGE_ONLY = 4; - function Block( $address = '', $user = '', $by = 0, $reason = '', + function Block( $address = '', $user = 0, $by = 0, $reason = '', $timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0 ) { $this->mId = 0; @@ -339,6 +339,12 @@ class Block $dbw =& wfGetDB( DB_MASTER ); $dbw->begin(); + # Unset ipb_anon_only and ipb_create_account for user blocks, makes no sense + if ( $this->mUser ) { + $this->mAnonOnly = 0; + $this->mCreateAccount = 0; + } + # Don't collide with expired blocks Block::purgeExpired();