contact_admin_delete

  1. drupal
    1. 4.7
    2. 5 contact.module
    3. 6 contact.admin.inc
Versions
4.7 – 5 contact_admin_delete($cid = NULL)
6 contact_admin_delete(&$form_state, $contact)

Category delete page.

Code

modules/contact.module, line 246

<?php
function contact_admin_delete($cid = NULL) {
  if ($info = db_fetch_object(db_query("SELECT category FROM {contact} WHERE cid = %d", $cid))) {
    $form['category'] = array(
      '#type' => 'value', 
      '#value' => $info->category,
    );

    return confirm_form('contact_admin_delete', $form, t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))), 'admin/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  }
  else {
    drupal_set_message(t('Category not found.'), 'error');
    drupal_goto('admin/contact');
  }
}
?>