You are here

function openlayers_update_7204 in Openlayers 7.2

Rename the 'baselayer' in 'isBaseLayer' in layers.

File

./openlayers.install, line 377
This file holds the functions for the installing and enabling of the openlayers module.

Code

function openlayers_update_7204() {
  openlayers_update_create_projection_table();
  foreach (openlayers_layers_load() as $key => $layer) {
    if ($layer->export_type != 1) {
      continue;
    }
    if (isset($layer->data['baselayer'])) {
      $layer->data['isBaseLayer'] = $layer->data['baselayer'];
      unset($layer->data['baselayer']);
      ctools_export_crud_save('openlayers_layers', $layer);
    }
  }
}