From 23f2b6b5c5200e37624b0eccda24d6cdad78d8d3 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 10 Jul 2006 08:38:22 +0000 Subject: [PATCH] Ignore ipb_anon_only and ipb_create_account for username blocks. --- includes/Block.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.20.1