http://www.mediawiki.org/wiki/Special:Code/MediaWiki/63052

Revision: 63052
Author:   ialex
Date:     2010-02-27 16:15:41 +0000 (Sat, 27 Feb 2010)

Log Message:
-----------
* (bugs 22665 and 22667) User '0' can now be unblocked and have its block 
settings changed

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/Block.php
    trunk/phase3/includes/specials/SpecialBlockip.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2010-02-27 16:10:21 UTC (rev 63051)
+++ trunk/phase3/RELEASE-NOTES  2010-02-27 16:15:41 UTC (rev 63052)
@@ -25,6 +25,8 @@
   updating DB
 * (bug 22666) Submitting user block form with an invalid user name no longer
   throws an error
+* (bugs 22665 and 22667) User '0' can now be unblocked and have its block
+  settings changed
 
 == API changes in 1.17 ==
 

Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php     2010-02-27 16:10:21 UTC (rev 63051)
+++ trunk/phase3/includes/Block.php     2010-02-27 16:15:41 UTC (rev 63052)
@@ -160,7 +160,7 @@
                $options = array();
                $db =& $this->getDBOptions( $options );
 
-               if ( 0 == $user && $address == '' ) {
+               if ( 0 == $user && $address === '' ) {
                        # Invalid user specification, not blocked
                        $this->clear();
                        return false;
@@ -178,7 +178,7 @@
                # Try IP block
                # TODO: improve performance by merging this query with the 
autoblock one
                # Slightly tricky while handling killExpired as well
-               if ( $address ) {
+               if ( $address !== '' ) {
                        $conds = array( 'ipb_address' => $address, 'ipb_auto' 
=> 0 );
                        $res = $db->resultObject( $db->select( 'ipblocks', '*', 
$conds, __METHOD__, $options ) );
 

Modified: trunk/phase3/includes/specials/SpecialBlockip.php
===================================================================
--- trunk/phase3/includes/specials/SpecialBlockip.php   2010-02-27 16:10:21 UTC 
(rev 63051)
+++ trunk/phase3/includes/specials/SpecialBlockip.php   2010-02-27 16:15:41 UTC 
(rev 63052)
@@ -105,7 +105,7 @@
                        $msg = wfMsgReal( $key, $err );
                        $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
                        $wgOut->addHTML( Xml::tags( 'p', array( 'class' => 
'error' ), $msg ) );
-               } elseif( $this->BlockAddress ) {
+               } elseif( $this->BlockAddress !== null ) {
                        # Get other blocks, i.e. from GlobalBlocking or 
TorBlock extension
                        wfRunHooks( 'OtherBlockLogLink', array( 
&$otherBlockedMsgs, $this->BlockAddress ) );
 



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to