You are here

function mailing_list_delete_confirm_submit in Mailing List 7

Same name and namespace in other branches
  1. 6 mailing_list.admin.inc \mailing_list_delete_confirm_submit()

Submit handler for the mailing list deletion form. @todo: D7 Upgrade this.

File

./mailing_list.admin.inc, line 293
Mailing list admin UI.

Code

function mailing_list_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    mailing_list_delete($form_state['values']['mlid']);

    // Remove corresponding block from all themes.
    module_invoke('block', 'flush_caches');
    drupal_set_message(t('Deleted mailing list %name.', array(
      '%name' => $form_state['values']['name'],
    )));
    watchdog('mailing list', 'Mailing list: deleted list %name.', array(
      '%name' => $form_state['values']['name'],
    ));
    $form_state['redirect'] = 'admin/structure/mailing-list';
    return;
  }
}