function countries_admin_delete_submit in Countries 7
Same name and namespace in other branches
- 8 countries.admin.inc \countries_admin_delete_submit()
- 7.2 countries.admin.inc \countries_admin_delete_submit()
Process countries delete form submission.
File
- ./
countries.admin.inc, line 316 - Admin page callbacks for the Countries module.
Code
function countries_admin_delete_submit($form, &$form_state) {
$country = $form['#country'];
field_attach_delete('country', $country);
db_delete('countries_country')
->condition('iso2', $country->iso2)
->execute();
drupal_set_message(t('Deleted country %country.', array(
'%country' => $country->name,
)));
$form_state['redirect'] = 'admin/config/content/countries';
}