You are here

function location_update_5303 in Location 7.3

Same name and namespace in other branches
  1. 5.3 location.install \location_update_5303()
  2. 6.3 location.install \location_update_5303()
  3. 7.5 location.install \location_update_5303()
  4. 7.4 location.install \location_update_5303()

Location 3.x update 4.

Shuffle more variables around.

File

./location.install, line 784
Install, update and uninstall functions for the location module.

Code

function location_update_5303() {
  $types = array();
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'location_display_teaser_%'");
  foreach ($result as $row) {
    $type = substr($row->name, 24);
    $types[$type]['teaser'] = variable_get('location_display_teaser_' . $type, TRUE);
    $types[$type]['full'] = variable_get('location_display_full_' . $type, TRUE);
    $types[$type]['weight'] = variable_get('location_display_weight_' . $type, 0);

    // @@@ Combine location_suppress_country and country require settings to set this up?
    $types[$type]['hide'] = array();
  }
  foreach ($types as $type => $value) {
    variable_set("location_display_{$type}", $value);
    variable_del("location_display_teaser_{$type}");
    variable_del("location_display_full_{$type}");
    variable_del("location_display_weight_{$type}");
  }
}