From 565fe1cac31b8e01d464875e45ce3f8a5b9c31aa Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 2 Nov 2008 17:17:19 +0000 Subject: [PATCH] Use MediaWiki whitespace standards, please. This file is really a mess, though. We need a unified system of functions that will autodetect any IP address format and convert to any desired format, not this hodgepodge of inconsistently-named and inconsistently-operating hacks. --- includes/IP.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/IP.php b/includes/IP.php index b9dfb73c9e..b1d94fd2c5 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -174,17 +174,16 @@ class IP { * @param $ip string Hex IP * @return string */ - public static function hexToIP($ip) - { + public static function hexToIP( $ip ) { // Converts a hexadecimal IP to nnn.nnn.nnn.nnn format - $dec = wfBaseConvert($ip, 16, 10); + $dec = wfBaseConvert( $ip, 16, 10 ); $parts[3] = $dec % 256; $dec /= 256; $parts[2] = $dec % 256; $dec /= 256; $parts[1] = $dec % 256; $parts[0] = $dec / 256; - return implode('.', array_reverse($parts)); + return implode( '.', array_reverse( $parts ) ); } /** -- 2.20.1