function ip_geoloc_ips_to_be_synched in IP Geolocation Views & Maps 7
Returns a list of IP addresses still to be processed.
These are all IP addresses in the current access log that have not yet had their geolocation data added to the ip_geoloc table.
Return value
array A list of hostnames still to be processed.
2 calls to ip_geoloc_ips_to_be_synched()
- ip_geoloc_diagnose in ./
ip_geoloc.admin.inc - Report on the configuration status.
- ip_geoloc_sync_with_accesslog in ./
ip_geoloc.admin.inc - Bring the visitor location database up to date with the system accesslog.
File
- ./
ip_geoloc.admin.inc, line 407 - Admin configuration settings for IPGV&M.
Code
function ip_geoloc_ips_to_be_synched() {
if (!db_table_exists('accesslog')) {
return array();
}
$hostnames = db_query('SELECT DISTINCT hostname FROM {accesslog} ORDER BY aid DESC')
->fetchCol('hostname');
$ip_geolocations = db_query('SELECT DISTINCT ip_address FROM {ip_geoloc}')
->fetchCol('ip_address');
return array_diff($hostnames, $ip_geolocations);
}