function ip_anon_tables in IP Anonymize 6
Same name and namespace in other branches
- 8 ip_anon.inc \ip_anon_tables()
- 5 ip_anon.module \ip_anon_tables()
- 7 ip_anon.inc \ip_anon_tables()
Array of tables and columns which store hostnames and timestamps.
Modules may add tables by implementing hook_ip_anon_alter().
See also
2 calls to ip_anon_tables()
- ip_anon_cron_run in ./
ip_anon.pages.inc - Anonymize IP addresses which have exceeded the retention period.
- ip_anon_settings in ./
ip_anon.pages.inc - Configuration options for IP anonymize.
File
- ./
ip_anon.pages.inc, line 56 - Page callbacks and utility functions for IP anonymize module.
Code
function ip_anon_tables() {
$columns = drupal_map_assoc(array(
'hostname',
'timestamp',
));
$tables = array(
'accesslog' => $columns,
'comments' => $columns,
'flood' => $columns,
'sessions' => $columns,
'watchdog' => $columns,
);
drupal_alter('ip_anon', $tables);
foreach ($tables as $table => $columns) {
if (!db_table_exists($table)) {
unset($tables[$table]);
}
}
return $tables;
}