function location_update_5303 in Location 7.5
Same name and namespace in other branches
- 5.3 location.install \location_update_5303()
- 6.3 location.install \location_update_5303()
- 7.3 location.install \location_update_5303()
- 7.4 location.install \location_update_5303()
Location 3.x update 4. Shuffle more variables around.
File
- ./
location.install, line 692 - 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}");
}
}