Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -100,9 +100,12 @@ |
101 | 101 | if ( is_object( $user ) ) |
102 | 102 | $userId = $user->getId(); |
103 | 103 | $currentBlock = Block::newFromDB( $this->BlockAddress, $userId ); |
104 | | - if ( !is_null($currentBlock) && !$currentBlock->mAuto && !($currentBlock->mRangeStart && $currentBlock->mAddress != $this->BlockAddress) ) { |
105 | | - $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress ); |
106 | | - $alreadyBlocked = true; |
| 104 | + if ( !is_null($currentBlock) && !$currentBlock->mAuto && # The block exists and isn't an autoblock |
| 105 | + ( $currentBlock->mRangeStart == $currentBlock->mRangeEnd || # The block isn't a rangeblock |
| 106 | + # or if it is, the range is what we're about to block |
| 107 | + ( $currentBlock->mAddress == $this->BlockAddress ) ) ) { |
| 108 | + $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress ); |
| 109 | + $alreadyBlocked = true; |
107 | 110 | } |
108 | 111 | } |
109 | 112 | |