MediaWiki r43032 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r43031‎ | r43032 (on ViewVC)‎ | r43033 >
Date:21:46, 1 November 2008
Author:mrzman
Status:old (Comments)
Tags:
Comment:
Fix rangeblock detection
Modified paths:

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

  • 15:36, 12 September 2011 Meno25 (Talk | contribs) changed the status of r43032 [removed: ok added: old]
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Support
Download
Development
Communication
Toolbox