function gmap_location_update_5080 in GMap Module 5        
                          
                  
                        Same name and namespace in other branches
- 6.2 gmap_location.install \gmap_location_update_5080()
- 6 gmap_location.install \gmap_location_update_5080()
- 7.2 gmap_location.install \gmap_location_update_5080()
- 7 gmap_location.install \gmap_location_update_5080()
File
 
   - ./gmap_location.install, line 42
- gmap_location install routines.
Code
function gmap_location_update_5080() {
  
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'gmap_role_map_marker_%%'");
  $markers = array();
  while ($row = db_fetch_object($result)) {
    $num = (int) substr($row->name, 21);
    $markers[$num] = variable_get($row->name, 'drupal');
    variable_del($row->name);
  }
  variable_set('gmap_role_markers', $markers);
  
  variable_del('gmap_user_map_marker');
  
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'gmap_node_marker_%%'");
  $markers = array();
  while ($row = db_fetch_object($result)) {
    $type = substr($row->name, 17);
    $markers[$type] = variable_get($row->name, 'drupal');
    variable_del($row->name);
  }
  variable_set('gmap_node_markers', $markers);
  
  
  
  
  $temp = array(
    'macro' => variable_get('gmap_user_map', '[gmap |id=usermap|center=40,0|zoom=3|width=100%|height=400px]'),
    'header' => variable_get('gmap_user_map_header', 'This map illustrates the extent of users of this website. Each marker indicates a user that has entered their locations.'),
    'footer' => '',
  );
  variable_set('gmap_user_map', $temp);
  variable_del('gmap_user_map_header');
  
  $temp = array(
    'macro' => variable_get('gmap_node_map', '[gmap |id=nodemap|center=40,0|zoom=3|width=100%|height=400px]'),
    'header' => variable_get('gmap_node_map_header', 'This map illustrates the locations of the nodes on this website. Each marker indicates a node associated with a specific location.'),
    'footer' => '',
  );
  variable_set('gmap_node_map', $temp);
  variable_del('gmap_node_map_header');
  return array();
}