1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00

don't break if dns_system is true

This commit is contained in:
Bui 2014-10-06 04:08:10 +09:00 committed by czaks
parent 8b9932218f
commit 1e95e58811

View File

@ -2265,7 +2265,6 @@ function rDNS($ip_addr) {
if (!$config['dns_system']) {
$host = gethostbyaddr($ip_addr);
$isip = filter_var($host, FILTER_VALIDATE_IP);
} else {
$resp = shell_exec_error('host -W 1 ' . $ip_addr);
if (preg_match('/domain name pointer ([^\s]+)$/', $resp, $m))
@ -2274,6 +2273,8 @@ function rDNS($ip_addr) {
$host = $ip_addr;
}
$isip = filter_var($host, FILTER_VALIDATE_IP);
if ($config['fcrdns'] && !$isip && gethostbyname($host) != $ip_addr) {
$host = $ip_addr;
}