X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fclasses%2Fresolver.class.php;h=a6e6732c967d1799eaada5d7c5e8ca3ae3d05762;hp=aca38bb87560fc31304b019731204aa7a756dc91;hb=5f70ac9d208ca39e3381705afcad2654a700a850;hpb=5b90ab389309595fde01542842169d6cbd2fc562 diff --git a/inc/classes/resolver.class.php b/inc/classes/resolver.class.php index aca38bb875..a6e6732c96 100644 --- a/inc/classes/resolver.class.php +++ b/inc/classes/resolver.class.php @@ -67,7 +67,10 @@ class HostnameResolver { // Search for hostname in cache $result = sqlQueryEscaped("SELECT `ip` FROM `{?_MYSQL_PREFIX?}_dns_cache` WHERE `hostname`='%s' LIMIT 1", - array($hostname), __METHOD__, __LINE__); + array( + $hostname + ), __METHOD__, __LINE__ + ); // Does an entry exist? if (sqlNumRows($result) == 1) { @@ -94,7 +97,11 @@ class HostnameResolver { if (($matches[0] == $ip) && ($matches[1] >= 0) && ($matches[1] <= 255) && ($matches[2] >= 0) && ($matches[2] <= 255) && ($matches[3] >= 0) && ($matches[3] <= 255) && ($matches[4] > 0) && ($matches[4] < 255)) { // We also cache IP addresses sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_dns_cache` (`ip`, `hostname`, `added`) VALUES ('%s', '%s', NOW())", - array($ip, $hostname), __METHOD__, __LINE__); + array( + $ip, + $hostname + ), __METHOD__, __LINE__ + ); // Set return value to $ip //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("IP detected, cache entry written: %s->%s", $hostname, $ip)); @@ -109,7 +116,11 @@ class HostnameResolver { } else { // Put entry in DB sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_dns_cache` (`ip`, `hostname`, `added`) VALUES ('%s', '%s', NOW())", - array($ip, $hostname), __METHOD__, __LINE__); + array( + $ip, + $hostname + ), __METHOD__, __LINE__ + ); // Set return value to $ip $ret = $ip;