getdirections.install 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @file
  4. * getdirections module installation.
  5. */
  6. /**
  7. * Implements hook_uninstall().
  8. *
  9. */
  10. function getdirections_uninstall() {
  11. variable_del('getdirections_default');
  12. variable_del('getdirections_api_key');
  13. variable_del('getdirections_misc');
  14. variable_del('getdirections_returnlink');
  15. variable_del('getdirections_api3_key');
  16. variable_del('getdirections_colorbox');
  17. variable_del('getdirections_paths');
  18. variable_del('getdirections_ua');
  19. }
  20. /**
  21. * Implements hook_enable().
  22. *
  23. */
  24. function getdirections_enable() {
  25. 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');
  26. }
  27. function getdirections_update_6000() {
  28. $g3 = variable_get('use_v3', 0);
  29. variable_set('getdirections_use_v3', $g3);
  30. variable_del('use_v3');
  31. return array();
  32. }
  33. function getdirections_update_7000() {
  34. variable_del('getdirections_use_v3');
  35. return array();
  36. }
  37. function getdirections_update_7001() {
  38. $path = drupal_get_path('module', 'getdirections');
  39. variable_set('getdirections_paths', array(
  40. 'getdirections_v3_path' => $path . '/js/getdirections_v3.js',
  41. 'getdirections_v3a_path' => $path . '/js/getdirections_v3a.js',
  42. 'getdirections_v3b_path' => $path . '/js/getdirections_v3b.js',
  43. ));
  44. return array();
  45. }