Same name and namespace in other branches
  1. 4.7.x modules/contact.module \contact_admin_delete_submit()
  2. 5.x modules/contact/contact.module \contact_admin_delete_submit()

Process category delete form submission.

File

modules/contact/contact.admin.inc, line 143
Admin page callbacks for the contact module.

Code

function contact_admin_delete_submit($form, &$form_state) {
  $contact = $form_state['values']['contact'];
  db_query("DELETE FROM {contact} WHERE cid = %d", $contact['cid']);
  drupal_set_message(t('Category %category has been deleted.', array(
    '%category' => $contact['category'],
  )));
  watchdog('mail', 'Contact form: category %category deleted.', array(
    '%category' => $contact['category'],
  ), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/build/contact';
  return;
}