diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-03-15 14:13:43 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-03-15 14:13:43 +1100 |
| commit | 5abe3ae4b28d0279db1558adbf22cdd5fcf14699 (patch) | |
| tree | 0444984255a12009de5cfb4ff7cfbd5c9303bfe1 /inc/functions.php | |
| parent | 3179eef3382a2d8c54f716cf08aa98cb6ebe4ee3 (diff) | |
cache DNS
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/functions.php b/inc/functions.php index d757c2fe..a8a2a2e2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1675,8 +1675,8 @@ function DNS($host) { global $config; - if($config['cache']['enabled'] && ($host = cache::get('dns_' . $host))) { - return $host; + if($config['cache']['enabled'] && ($ip_addr = cache::get('dns_' . $host))) { + return $ip_addr; } if(!$config['dns_system']) { @@ -1692,7 +1692,7 @@ } if($config['cache']['enabled']) - cache::set('dns_' . $ip_addr, $host, 3600); + cache::set('dns_' . $host, $ip_addr, 3600); return $host; } |
