contact_category_delete_form_submit

Versions
mediamosa-21
contact_category_delete_form_submit($form, &$form_state)

Submit handler for the confirm delete category form.

See also

contact_category_delete_form()

Code

modules/contact/contact.admin.inc, line 198

<?php
function contact_category_delete_form_submit($form, &$form_state) {
  $contact = $form['contact']['#value'];

  db_delete('contact')
    ->condition('cid', $contact['cid'])
    ->execute();

  drupal_set_message(t('Category %category has been deleted.', array('%category' => $contact['category'])));
  watchdog('contact', 'Category %category has been deleted.', array('%category' => $contact['category']), WATCHDOG_NOTICE);

  $form_state['redirect'] = 'admin/structure/contact';
}
?>