Index: trunk/phase3/includes/Block.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | const EB_FOR_UPDATE = 2; |
26 | 26 | const EB_RANGE_ONLY = 4; |
27 | 27 | |
28 | | - function Block( $address = '', $user = '', $by = 0, $reason = '', |
| 28 | + function Block( $address = '', $user = 0, $by = 0, $reason = '', |
29 | 29 | $timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0 ) |
30 | 30 | { |
31 | 31 | $this->mId = 0; |
— | — | @@ -339,6 +339,12 @@ |
340 | 340 | $dbw =& wfGetDB( DB_MASTER ); |
341 | 341 | $dbw->begin(); |
342 | 342 | |
| 343 | + # Unset ipb_anon_only and ipb_create_account for user blocks, makes no sense |
| 344 | + if ( $this->mUser ) { |
| 345 | + $this->mAnonOnly = 0; |
| 346 | + $this->mCreateAccount = 0; |
| 347 | + } |
| 348 | + |
343 | 349 | # Don't collide with expired blocks |
344 | 350 | Block::purgeExpired(); |
345 | 351 | |