dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7f76a6
)
Fixes for r51236 per CR comments
author
Roan Kattouw
<catrope@users.mediawiki.org>
Sun, 31 May 2009 15:02:43 +0000
(15:02 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Sun, 31 May 2009 15:02:43 +0000
(15:02 +0000)
includes/IP.php
patch
|
blob
|
history
diff --git
a/includes/IP.php
b/includes/IP.php
index
355c7b6
..
a2a3547
100644
(file)
--- a/
includes/IP.php
+++ b/
includes/IP.php
@@
-502,10
+502,10
@@
class IP {
*/
public static function isInRange( $addr, $range ) {
// Convert to IPv6 if needed
- $
unsignedIP = self::toUnsigned
( $addr );
+ $
hexIP = self::toHex
( $addr );
list( $start, $end ) = self::parseRange( $range );
- return (
($unsignedIP >= base_convert($start, 16, 10))
&&
-
($unsignedIP <= base_convert($end, 16, 10))
);
+ return (
strcmp($hexIP, $start) >= 0
&&
+
strcmp($hexIP, $end) <= 0
);
}
/**