You are here

function maillog_maillog_delete in Maillog / Mail Developer 6

Same name and namespace in other branches
  1. 7 maillog.module \maillog_maillog_delete()

Implementation of hook_menu().

1 string reference to 'maillog_maillog_delete'
maillog_menu in ./maillog.module
Implementation of hook_menu().

File

./maillog.module, line 29
Provides a 'maillog' node type

Code

function maillog_maillog_delete($maillog) {
  $idmaillog = $maillog['idmaillog'];
  $result = db_query("DELETE FROM {maillog} WHERE `idmaillog` = '%d'", $idmaillog);
  if ($result == FALSE) {
    drupal_set_message(t('A Problem occured when deleting Mail with idmaillog !idmaillog !', array(
      '!idmaillog' => $idmaillog,
    )));
  }
  else {
    drupal_set_message(t('Mail with idmaillog !idmaillog has been deleted!', array(
      '!idmaillog' => $idmaillog,
    )));
  }
  drupal_goto('maillog/log');
  return '';
}