Index: trunk/phase3/includes/User.php |
— | — | @@ -431,13 +431,7 @@ |
432 | 432 | * @return bool |
433 | 433 | */ |
434 | 434 | static function isIP( $name ) { |
435 | | - return IP::isIPAddress($name); |
436 | | - /*return preg_match("/^ |
437 | | - (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\. |
438 | | - (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\. |
439 | | - (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\. |
440 | | - (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5])) |
441 | | - $/x", $name);*/ |
| 435 | + return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name); |
442 | 436 | } |
443 | 437 | |
444 | 438 | /** |