Minor logic error on removing blocks on range when tweaking an IP.
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 9 Jun 2008 22:35:17 +0000 (22:35 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 9 Jun 2008 22:35:17 +0000 (22:35 +0000)
includes/SpecialBlockip.php

index 620fd80..495ee74 100644 (file)
@@ -388,7 +388,7 @@ class IPBlockForm {
 
                if ( wfRunHooks('BlockIp', array(&$block, &$wgUser)) ) {
 
-                       if ( $oldblock = Block::newFromDB( $this->BlockAddress ) ) {
+                       if ( $oldblock = Block::newFromDB( $this->BlockAddress ) && $oldblock->mAddress == $this->BlockAddress  ) {
                                $oldblock->delete(); // Block already exists. Silently delete it
                        }
                        $block->insert();