You are here

function smart_ip_install in Smart IP 6

Same name and namespace in other branches
  1. 6.2 smart_ip.install \smart_ip_install()
  2. 7.2 smart_ip.install \smart_ip_install()
  3. 7 smart_ip.install \smart_ip_install()

Implements hook_install().

Creates database tables needed by this module.

File

./smart_ip.install, line 133

Code

function smart_ip_install() {

  /* Create tables */
  drupal_install_schema('smart_ip');
  variable_set('smart_ip_correct_ipinfodb_key', FALSE);
  variable_set('smart_ip_get_zip_done', FALSE);
  variable_set('smart_ip_extract_zip_done', FALSE);
  variable_set('smart_ip_store_location_csv_done', FALSE);
  variable_set('smart_ip_db_update_busy', FALSE);
  variable_set('smart_ip_location_csv_pointer', 0);
  variable_set('smart_ip_location_csv_last_pointer', 0);
  variable_set('smart_ip_blocks_csv_pointer', 0);
  variable_set('smart_ip_blocks_csv_last_pointer', 0);
  variable_set('smart_ip_roles_to_geolocate', array(
    DRUPAL_AUTHENTICATED_RID,
  ));
}