X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2FIP.php;h=b22f06d3875ed9a26827d91c85f8a0ea2655f1d4;hp=e8b0e6a77084b45d28a20d53c3a4d605e28d1090;hb=956c2430c7b8fceb289aaeacc8d6c2e0def2c56e;hpb=9fde467caca76dbefb984f23736904cf8f2bcdb8 diff --git a/includes/libs/IP.php b/includes/libs/IP.php index e8b0e6a770..b22f06d387 100644 --- a/includes/libs/IP.php +++ b/includes/libs/IP.php @@ -549,7 +549,7 @@ class IP { */ private static function parseCIDR6( $range ) { # Explode into - $parts = explode( '/', IP::sanitizeIP( $range ), 2 ); + $parts = explode( '/', self::sanitizeIP( $range ), 2 ); if ( count( $parts ) != 2 ) { return [ false, false ]; } @@ -590,7 +590,7 @@ class IP { */ private static function parseRange6( $range ) { # Expand any IPv6 IP - $range = IP::sanitizeIP( $range ); + $range = self::sanitizeIP( $range ); // CIDR notation... if ( strpos( $range, '/' ) !== false ) { list( $network, $bits ) = self::parseCIDR6( $range ); @@ -732,8 +732,8 @@ class IP { public static function getSubnet( $ip ) { $matches = []; $subnet = false; - if ( IP::isIPv6( $ip ) ) { - $parts = IP::parseRange( "$ip/64" ); + if ( self::isIPv6( $ip ) ) { + $parts = self::parseRange( "$ip/64" ); $subnet = $parts[0]; } elseif ( preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) { // IPv4