You are here

function maillog_maillog_delete_form_submit in Maillog / Mail Developer 7

FormAPI confirmation callback for maillog_maillog_delete_form().

File

./maillog.pages.inc, line 60
Menu API callback handlers for Maillog pages.

Code

function maillog_maillog_delete_form_submit($form, &$form_state) {
  if (maillog_maillog_delete($form_state['values']['id'])) {
    drupal_set_message(t('Message #!id has been deleted.', array(
      '!id' => $form_state['values']['id'],
    )));
  }
  else {
    drupal_set_message(t('A problem occurred when deleting message #!id!', array(
      '!id' => $form_state['values']['id'],
    )));
  }
  $form_state['redirect'] = 'admin/reports/maillog';
}