You are here

function gmap_location_node_type in GMap Module 6.2

Same name and namespace in other branches
  1. 5 gmap_location.module \gmap_location_node_type()
  2. 6 gmap_location.module \gmap_location_node_type()
  3. 7.2 gmap_location.module \gmap_location_node_type()
  4. 7 gmap_location.module \gmap_location_node_type()

Implementation of hook_node_type().

File

./gmap_location.module, line 802
GMap Location module is a module to add some gmap funcationality based on location.modules information.

Code

function gmap_location_node_type($op, $info) {
  $temp = variable_get('gmap_node_markers', array());
  switch ($op) {
    case 'delete':
      unset($temp[$info->type]);
      break;
    case 'insert':
      $temp[$info->type] = 'drupal';
      break;
    case 'update':
      if (!empty($info->old_type) && $info->old_type != $info->type) {
        $temp[$info->type] = $temp[$info->old_type];
        unset($temp[$info->old_type]);
      }
      break;
  }
  variable_set('gmap_node_markers', $temp);
}