You are here

getdirections.install in Get Directions 7.3

getdirections module installation.

File

getdirections.install
View source
<?php

/**
 * @file
 * getdirections module installation.
 */

/**
 * Implements hook_uninstall().
 *
 */
function getdirections_uninstall() {
  variable_del('getdirections_default');
  variable_del('getdirections_api_key');
  variable_del('getdirections_misc');
  variable_del('getdirections_returnlink');
  variable_del('getdirections_api3_key');
  variable_del('getdirections_api3_clientID');
  variable_del('getdirections_api3_channel');
  variable_del('getdirections_colorbox');
  variable_del('getdirections_paths');
  variable_del('getdirections_ua');
}

/**
 * Implements hook_enable().
 *
 */
function getdirections_enable() {
  if (drupal_is_cli()) {
    return;
  }
  if (isset($_GET) && $_GET['q'] == 'admin/modules' || isset($_REQUEST['overlay']) && $_REQUEST['overlay'] == 'admin/modules') {
    drupal_set_message(st('Thank you for installing Getdirections. To set it up please visit the <a href="@url">configuration page</a>.', array(
      '@url' => url('admin/config/services/getdirections'),
    )), 'status');
  }
}
function getdirections_update_6000() {
  $g3 = variable_get('use_v3', 0);
  variable_set('getdirections_use_v3', $g3);
  variable_del('use_v3');
  return array();
}
function getdirections_update_7000() {
  variable_del('getdirections_use_v3');
  return array();
}
function getdirections_update_7001() {
  $path = drupal_get_path('module', 'getdirections');
  variable_set('getdirections_paths', array(
    'getdirections_v3_path' => $path . '/js/getdirections_v3.js',
    'getdirections_v3a_path' => $path . '/js/getdirections_v3a.js',
    'getdirections_v3b_path' => $path . '/js/getdirections_v3b.js',
  ));
  return array();
}