function gmap_update_5000 in GMap Module 6
Same name and namespace in other branches
- 5 gmap.install \gmap_update_5000()
- 6.2 gmap.install \gmap_update_5000()
- 7.2 gmap.install \gmap_update_5000()
- 7 gmap.install \gmap_update_5000()
Updates from 5.x-1.0alpha1 to 5.x-1.0. Do some tidying up of the settings.
File
- ./
gmap.install, line 29 - GMap install/uninstall routines.
Code
function gmap_update_5000() {
$ret = array();
$d = variable_get('gmap_default', array());
// Add the previous implicit baselayers back in.
if (!isset($d['baselayers'])) {
$d['baselayers'] = array(
// Default map type
'maptype' => isset($d['maptype']) ? $d['maptype'] : 'Map',
'Map' => 1,
'Satellite' => 1,
'Hybrid' => 1,
'Physical' => 0,
);
}
// Default maptype was moved into baselayers.
unset($d['maptype']);
// Determine the map type control that was in use.
if (!isset($d['mtc'])) {
// User had the notype behavior flag set.
if (!empty($d['behavior']['notype'])) {
$d['mtc'] = 'none';
}
else {
$d['mtc'] = 'standard';
}
}
// notype is gone, mtc is more generic.
if (isset($d['behavior']['notype'])) {
unset($d['behavior']['notype']);
}
variable_set('gmap_default', $d);
return $ret;
}