You are here

function contact_admin_delete in Drupal 5

Same name and namespace in other branches
  1. 4 modules/contact.module \contact_admin_delete()
  2. 6 modules/contact/contact.admin.inc \contact_admin_delete()

Category delete page.

1 string reference to 'contact_admin_delete'
contact_menu in modules/contact/contact.module
Implementation of hook_menu().

File

modules/contact/contact.module, line 252
Enables the use of personal and site-wide contact forms.

Code

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($form, t('Are you sure you want to delete %category?', array(
      '%category' => $info->category,
    )), 'admin/build/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  }
  else {
    drupal_set_message(t('Category not found.'), 'error');
    drupal_goto('admin/build/contact');
  }
}