2016-10-26 17:22:38 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Farm map install.
|
|
|
|
*/
|
|
|
|
|
2017-09-04 19:38:18 +02:00
|
|
|
/**
|
|
|
|
* Copy the Google Maps API key into the new configuration variable.
|
|
|
|
*/
|
|
|
|
function farm_map_update_7000(&$sandbox) {
|
2020-02-07 19:57:13 +01:00
|
|
|
// Removed.
|
2016-10-26 17:22:38 +02:00
|
|
|
}
|
2019-10-29 18:59:32 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete the old farm_map_default_base_layer variable.
|
|
|
|
*/
|
|
|
|
function farm_map_update_7001(&$sandbox) {
|
|
|
|
variable_del('farm_map_default_base_layer');
|
|
|
|
}
|
2019-07-24 15:55:51 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Install new Google Maps module if an API key is saved.
|
|
|
|
*/
|
|
|
|
function farm_map_update_7002(&$sandbox) {
|
|
|
|
$module = 'farm_map_google';
|
|
|
|
if (variable_get('farm_map_google_api_key', FALSE) && !module_exists($module)) {
|
|
|
|
module_enable(array($module));
|
|
|
|
}
|
|
|
|
}
|
2019-09-23 21:02:30 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Install new Mapbox module if an API key is saved.
|
|
|
|
*/
|
|
|
|
function farm_map_update_7003(&$sandbox) {
|
|
|
|
$module = 'farm_map_mapbox';
|
|
|
|
if (variable_get('farm_map_mapbox_api_key', FALSE) && !module_exists($module)) {
|
|
|
|
module_enable(array($module));
|
|
|
|
}
|
|
|
|
}
|
2019-12-12 20:45:08 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete the old farm_map_show variable.
|
|
|
|
*/
|
|
|
|
function farm_map_update_7004(&$sandbox) {
|
|
|
|
variable_del('farm_map_show');
|
|
|
|
}
|