You are here

function getlocations_uninstall in Get Locations 7

Same name and namespace in other branches
  1. 6.2 getlocations.install \getlocations_uninstall()
  2. 6 getlocations.install \getlocations_uninstall()
  3. 7.2 getlocations.install \getlocations_uninstall()

Implements hook_uninstall().

File

./getlocations.install, line 15
getlocations.install @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_uninstall() {
  $query = db_delete('variable')
    ->condition('name', 'getlocations_%', 'LIKE')
    ->execute();

  // delete markerfile
  if (file_default_scheme() == 'public') {
    $markerpath = file_stream_wrapper_get_instance_by_scheme(file_default_scheme())
      ->getDirectoryPath() . '/getlocations';
    if (file_exists($markerpath)) {
      file_unmanaged_delete_recursive($markerpath);
    }
  }
}