From 58efc31361274c53151b25cc10bdc97eb13287f4 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 1 Nov 2010 00:03:09 +0000 Subject: [PATCH] Fixup undefined $this->id Fix assignment in conditional --- includes/specials/SpecialIpblocklist.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index 67708cffd0..cc1c140b94 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -71,10 +71,10 @@ class IPUnblockForm extends SpecialPage { # bug 15810: blocked admins should have limited access here if ( $wgUser->isBlocked() ) { - if ( $id ) { + if ( $this->id ) { # This doesn't pick up on autoblocks, but admins # should have the ipblock-exempt permission anyway - $block = Block::newFromID( $id ); + $block = Block::newFromID( $this->id ); $user = User::newFromName( $block->mAddress ); } else { $user = User::newFromName( $ip ); @@ -284,7 +284,8 @@ class IPUnblockForm extends SpecialPage { $conds['ipb_id'] = substr( $this->ip, 1 ); // Single IPs } elseif ( IP::isIPAddress( $this->ip ) && strpos( $this->ip, '/' ) === false ) { - if( $iaddr = IP::toHex( $this->ip ) ) { + $iaddr = IP::toHex( $this->ip ); + if( $iaddr ) { # Only scan ranges which start in this /16, this improves search speed # Blocks should not cross a /16 boundary. $range = substr( $iaddr, 0, 4 ); -- 2.20.1