From 3337669b0c158da3c0f29973beeb5b418ac44fc5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 2 Nov 2008 18:35:58 +0000 Subject: [PATCH] * Fix comment * Rename HexToIP -> HexToQuad --- includes/IP.php | 4 ++-- includes/api/ApiQueryBlocks.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/IP.php b/includes/IP.php index b1d94fd2c5..e5973c2b04 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -152,7 +152,7 @@ class IP { } /** - * Given an unsigned integer, returns an IPv6 address in octet notation + * Given a hexadecimal number, returns to an IPv6 address in octet notation * @param $ip string hex IP * @return string */ @@ -174,7 +174,7 @@ class IP { * @param $ip string Hex IP * @return string */ - public static function hexToIP( $ip ) { + public static function hexToQuad( $ip ) { // Converts a hexadecimal IP to nnn.nnn.nnn.nnn format $dec = wfBaseConvert( $ip, 16, 10 ); $parts[3] = $dec % 256; diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index c3b46a6299..2cb40acf4e 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -148,8 +148,8 @@ class ApiQueryBlocks extends ApiQueryBase { $block['reason'] = $row->ipb_reason; if($fld_range) { - $block['rangestart'] = IP::hexToIP($row->ipb_range_start); - $block['rangeend'] = IP::hexToIP($row->ipb_range_end); + $block['rangestart'] = IP::hexToQuad($row->ipb_range_start); + $block['rangeend'] = IP::hexToQuad($row->ipb_range_end); } if($fld_flags) { -- 2.20.1