r43032 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43031‎ | r43032 | r43033 >
Date:21:46, 1 November 2008
Author:mrzman
Status:old (Comments)
Tags:
Comment:
Fix rangeblock detection
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -100,9 +100,12 @@
101101 if ( is_object( $user ) )
102102 $userId = $user->getId();
103103 $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;
107110 }
108111 }
109112

Comments

#Comment by Aaron Schulz (talk | contribs)   15:37, 3 November 2008

Looks OK now, I *think*

Status & tagging log