You are here

device_geolocation.install in Smart IP 7

Installation callback for Device Geolocation.

File

modules/device_geolocation/device_geolocation.install
View source
<?php

// $Id$

/**
 * @file
 * Installation callback for Device Geolocation.
 */

/**
 * Implements hook_uninstall().
 *
 * Removes all variables inserted into the
 * database by this module.
 */
function device_geolocation_uninstall() {
  variable_del('device_geolocation_ajax_check');
  variable_del('device_geolocation_allowed_pages');
  variable_del('device_geolocation_check_frequency');
}

/**
 * Rename 'field-coordinates' menu to 'geolocate-user'.
 */
function device_geolocation_update_7000() {
  cache_clear_all();
}

/**
 * Convert variable 'device_geolocation_allowed_pages' from array to string.
 */
function device_geolocation_update_7001() {
  variable_set('device_geolocation_allowed_pages', implode("\n", variable_get('device_geolocation_allowed_pages', array())));
}

Functions

Namesort descending Description
device_geolocation_uninstall Implements hook_uninstall().
device_geolocation_update_7000 Rename 'field-coordinates' menu to 'geolocate-user'.
device_geolocation_update_7001 Convert variable 'device_geolocation_allowed_pages' from array to string.