You are here

function mass_contact_admin_delete in Mass Contact 5

Same name and namespace in other branches
  1. 5.2 mass_contact.module \mass_contact_admin_delete()
  2. 6 mass_contact.module \mass_contact_admin_delete()
  3. 7 mass_contact.admin.inc \mass_contact_admin_delete()

Category delete page.

1 string reference to 'mass_contact_admin_delete'
mass_contact_menu in ./mass_contact.module
Implementation of hook_menu().

File

./mass_contact.module, line 227
Enables mass contact form to selected roles.

Code

function mass_contact_admin_delete($cid = NULL) {
  if ($info = db_fetch_object(db_query("SELECT category FROM {mass_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/mass_contact', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  }
  else {
    drupal_set_message(t('Category not found.'), 'error');
    drupal_goto('admin/build/mass_contact');
  }
}