From: Sam Reed Date: Mon, 1 Nov 2010 00:03:09 +0000 (+0000) Subject: Fixup undefined $this->id X-Git-Tag: 1.31.0-rc.0~34166 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=58efc31361274c53151b25cc10bdc97eb13287f4;p=lhc%2Fweb%2Fwiklou.git Fixup undefined $this->id Fix assignment in conditional --- 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 );