Loosen ipv4 check back, this really should be called isLikeIP()

This commit is contained in:
Aaron Schulz 2008-06-19 06:14:53 +00:00
parent 6928864a0c
commit 8bd6a73d40

View file

@ -431,13 +431,7 @@ class User {
* @return bool
*/
static function isIP( $name ) {
return IP::isIPAddress($name);
/*return preg_match("/^
(?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\.
(?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\.
(?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\.
(?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))
$/x", $name);*/
return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name);
}
/**