You are here

function mailhandler_admin_delete_confirm_submit in Mailhandler 5

Same name and namespace in other branches
  1. 6 mailhandler.admin.inc \mailhandler_admin_delete_confirm_submit()
  2. 7 mailhandler.admin.inc \mailhandler_admin_delete_confirm_submit()

File

./mailhandler.module, line 840

Code

function mailhandler_admin_delete_confirm_submit($form_id, $form_values) {
  $info = db_fetch_object(db_query("SELECT mid, mail FROM {mailhandler} WHERE mid = %d", $form_values['mid']));
  db_query("DELETE FROM {mailhandler} WHERE mid = %d", $form_values['mid']);
  watchdog('mailhandler', t('Mailhandler: Mailbox %mailbox deleted', array(
    '%mailbox' => $info->mail,
  )), WATCHDOG_NOTICE);
  drupal_set_message(t('Mailbox %mailbox deleted', array(
    '%mailbox' => $info->mail,
  )));
  drupal_goto('admin/content/mailhandler');
}