r15488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15487‎ | r15488 | r15489 >
Date:08:38, 10 July 2006
Author:tstarling
Status:old
Tags:
Comment:
Ignore ipb_anon_only and ipb_create_account for username blocks.
Modified paths:
  • /trunk/phase3/includes/Block.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Block.php
@@ -24,7 +24,7 @@
2525 const EB_FOR_UPDATE = 2;
2626 const EB_RANGE_ONLY = 4;
2727
28 - function Block( $address = '', $user = '', $by = 0, $reason = '',
 28+ function Block( $address = '', $user = 0, $by = 0, $reason = '',
2929 $timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0 )
3030 {
3131 $this->mId = 0;
@@ -339,6 +339,12 @@
340340 $dbw =& wfGetDB( DB_MASTER );
341341 $dbw->begin();
342342
 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+
343349 # Don't collide with expired blocks
344350 Block::purgeExpired();
345351