r20440 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20439‎ | r20440 | r20441 >
Date:06:06, 14 March 2007
Author:aaron
Status:old
Tags:
Comment:
*Show block log for IPv6 IPs too
Modified paths:
  • /trunk/phase3/includes/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialBlockip.php
@@ -191,6 +191,8 @@
192192 $this->showLogFragment( $wgOut, $user->getUserPage() );
193193 } elseif( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $this->BlockAddress ) ) {
194194 $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) );
 195+ } elseif( preg_match( '/^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}/', $this->BlockAddress ) ) {
 196+ $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) );
195197 }
196198 }
197199
@@ -198,7 +200,6 @@
199201 global $wgOut, $wgUser, $wgSysopUserBans, $wgSysopRangeBans;
200202
201203 $userId = 0;
202 - $this->BlockAddress = trim( $this->BlockAddress );
203204 # Expand valid IPv6 addresses, usernames are left as is
204205 $this->BlockAddress = IP::sanitizeIP( $this->BlockAddress );
205206 # isIPv4() and IPv6() are used for final validation