You are here

function mass_contact_admin_delete_submit in Mass Contact 7

Same name and namespace in other branches
  1. 5.2 mass_contact.module \mass_contact_admin_delete_submit()
  2. 5 mass_contact.module \mass_contact_admin_delete_submit()
  3. 6 mass_contact.module \mass_contact_admin_delete_submit()

Does the actual deleting of the category.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: A keyed array containing the current state of the form.

File

./mass_contact.admin.inc, line 275
The administrative settings pages.

Code

function mass_contact_admin_delete_submit(array $form, array &$form_state) {
  db_delete('mass_contact')
    ->condition('cid', arg(5))
    ->execute();
  drupal_set_message(t('Category %category has been deleted.', array(
    '%category' => $form_state['values']['category'],
  )));
  watchdog('mass_contact', 'Mass Contact form: category %category deleted.', array(
    '%category' => $form_state['values']['category'],
  ));
  $form_state['redirect'] = 'admin/config/system/mass_contact';
}