* (bugs 22665 and 22667) User '0' can now be unblocked and have its block settings...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Feb 2010 16:15:41 +0000 (16:15 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Feb 2010 16:15:41 +0000 (16:15 +0000)
RELEASE-NOTES
includes/Block.php
includes/specials/SpecialBlockip.php

index 45171de..1d79a61 100644 (file)
@@ -25,6 +25,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   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 ==
 
index 74a3b58..b8d97a5 100644 (file)
@@ -160,7 +160,7 @@ class Block {
                $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 @@ class Block {
                # 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 ) );
 
index 1e56fa6..f8d7ac3 100644 (file)
@@ -105,7 +105,7 @@ class IPBlockForm {
                        $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 ) );