If an IP address is blocked as part of a rangeblock, attempting to unblock the single...
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 13 Nov 2007 05:09:30 +0000 (05:09 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 13 Nov 2007 05:09:30 +0000 (05:09 +0000)
RELEASE-NOTES
includes/SpecialIpblocklist.php

index c82e571..e4bfac6 100644 (file)
@@ -147,6 +147,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   article text, rather than getting 150 characters (which may be too much)
 * Add two messages for Special:Blockme which were used but undefined
 * (bug 11921) Support plural in message number_of_watching_users_pageview
+* If an IP address is blocked as part of a rangeblock, attempting to unblock
+  the single IP should not unblock the entire range.
 
 === API changes in 1.12 ===
 
index 015da0d..6edbd7a 100644 (file)
@@ -156,8 +156,14 @@ class IPUnblockForm {
                                $block = Block::newFromID( $id );
                        } else {
                                $block = Block::newFromDB( $this->ip );
+
                                if ( !$block ) { 
                                        $block = null;
+                               } else if ( !$block->mUser && $block->mRangeStart 
+                                               && !strstr ( $this->ip, "/" ) ) {
+                                       /* If the specified IP is a single address, and the block is
+                                        * a range block, don't unblock the range. */
+                                       $block = null;
                                }
                        }
                }