function ip2country_install in IP-based Determination of a Visitor's Country 7
Same name and namespace in other branches
- 8 ip2country.install \ip2country_install()
- 6 ip2country.install \ip2country_install()
Implements hook_install().
Populates database tables needed by this module.
By default, this module WILL populate the database. But because it is so time-consuming, an option is available to not populate the database automatically on install, intended for use by SimpleTest.
File
- ./
ip2country.install, line 88 - Install, update, and uninstall functions for the ip2country module.
Code
function ip2country_install() {
//
// Set the variable to FALSE before installing this module to
// leave the database table empty on install.
//
if (variable_get('ip2country_populate_database_on_install', TRUE)) {
module_load_include('inc', 'ip2country');
ip2country_update_database();
}
// Set the default date format for reporting database update date/time.
variable_set('date_format_ip2country_date', 'n/j/Y');
variable_set('date_format_ip2country_time', 'H:i:s T');
}