dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git]
/
includes
/
libs
/
IP.php
diff --git
a/includes/libs/IP.php
b/includes/libs/IP.php
index
a6aa0a3
..
b22f06d
100644
(file)
--- a/
includes/libs/IP.php
+++ b/
includes/libs/IP.php
@@
-18,7
+18,7
@@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Antoine Musso "<hashar at free dot fr>"
, Aaron Schulz
+ * @author Antoine Musso "<hashar at free dot fr>"
*/
use IPSet\IPSet;
*/
use IPSet\IPSet;
@@
-549,7
+549,7
@@
class IP {
*/
private static function parseCIDR6( $range ) {
# Explode into <expanded IP,range>
*/
private static function parseCIDR6( $range ) {
# Explode into <expanded IP,range>
- $parts = explode( '/',
IP
::sanitizeIP( $range ), 2 );
+ $parts = explode( '/',
self
::sanitizeIP( $range ), 2 );
if ( count( $parts ) != 2 ) {
return [ false, false ];
}
if ( count( $parts ) != 2 ) {
return [ false, false ];
}
@@
-590,7
+590,7
@@
class IP {
*/
private static function parseRange6( $range ) {
# Expand any IPv6 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 );
// 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;
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
$subnet = $parts[0];
} elseif ( preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
// IPv4