From 2cd393fa66a166b662ce93bd0250741efbf014f2 Mon Sep 17 00:00:00 2001
From: smk-ka <smk-ka@48898.no-reply.drupal.org>
Date: Thu, 8 Sep 2011 17:08:06 +0200
Subject: [PATCH 1/2] fixed the missing delete button in the maillog view

---
 maillog.info   |    9 ++-------
 maillog.module |    6 ++----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/maillog.info b/maillog.info
index a4f5444..314b3cb 100644
--- a/maillog.info
+++ b/maillog.info
@@ -7,12 +7,7 @@ dependencies[] = views
 
 configure = admin/config/development/maillog
 
-files[] = maillog.module
-files[] = maillog.install
-files[] = maillog.info
 files[] = includes/maillog.mail.inc
-files[] = includes/maillog.views.inc  
-files[] = includes/maillog.views_default.inc
-files[] = maillog_handler_field_maillog_entry_link_delete.inc
-files[] = maillog_handler_field_maillog_link_delete.inc
+files[] = includes/maillog_handler_field_maillog_entry_link_delete.inc
+files[] = includes/maillog_handler_field_maillog_link_delete.inc
 
diff --git a/maillog.module b/maillog.module
index 2e73654..7356acb 100644
--- a/maillog.module
+++ b/maillog.module
@@ -35,17 +35,15 @@ function maillog_permission() {
   );
 }
 
-function maillog_maillog_delete( $maillog ) {
+function maillog_maillog_delete($maillog) {
   $idmaillog = $maillog['idmaillog'];
-  $result = db_query("DELETE FROM {maillog} WHERE `idmaillog` = '%d'", $idmaillog);
+  $result = db_query("DELETE FROM {maillog} WHERE idmaillog = :id", array(':id' => $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 '';
 }
 
 /**
-- 
1.7.0.4

