From e2ca0070aebb5868936cc071cfe67f7b1f065a7c Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 14 Mar 2007 06:06:15 +0000 Subject: [PATCH] *Show block log for IPv6 IPs too --- includes/SpecialBlockip.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 12cf287a66..25a0727883 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -191,6 +191,8 @@ class IPBlockForm { $this->showLogFragment( $wgOut, $user->getUserPage() ); } elseif( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $this->BlockAddress ) ) { $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) ); + } 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 ) ) { + $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) ); } } @@ -198,7 +200,6 @@ class IPBlockForm { global $wgOut, $wgUser, $wgSysopUserBans, $wgSysopRangeBans; $userId = 0; - $this->BlockAddress = trim( $this->BlockAddress ); # Expand valid IPv6 addresses, usernames are left as is $this->BlockAddress = IP::sanitizeIP( $this->BlockAddress ); # isIPv4() and IPv6() are used for final validation -- 2.20.1