From: Aryeh Gregor Date: Sun, 2 Nov 2008 17:17:19 +0000 (+0000) Subject: Use MediaWiki whitespace standards, please. X-Git-Tag: 1.31.0-rc.0~44466 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=565fe1cac31b8e01d464875e45ce3f8a5b9c31aa;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) ); } /**