function weather_location_delete_confirm_submit in Weather 7.3
Same name and namespace in other branches
- 7 weather.forms.inc \weather_location_delete_confirm_submit()
- 7.2 weather.forms.inc \weather_location_delete_confirm_submit()
Implements actual deletion of location.
File
- ./
weather.forms.inc, line 754 - Provide forms for configuration of weather displays.
Code
function weather_location_delete_confirm_submit($form, &$form_state) {
db_delete('weather_displays_places')
->condition('id', $form_state['values']['id'])
->execute();
if ($form_state['values']['display_type'] == 'user') {
$path = 'user/' . $form_state['values']['display_number'] . '/weather';
}
else {
$path = 'admin/config/user-interface/weather';
}
$form_state['redirect'] = $path;
}