If an IP address is blocked as part of a rangeblock, attempting to unblock the single...
[lhc/web/wiklou.git] / includes / SpecialIpblocklist.php
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;
                                }
                        }
                }