From 1f4ea5d132a4beaf35a93b31971acc60e965eedb Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Fri, 6 Oct 2017 19:12:00 +0200 Subject: [PATCH] no usage in admin/ of the panel. Useless anyway since is_it_my_mail() check it already --- bureau/admin/mail_del.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/bureau/admin/mail_del.php b/bureau/admin/mail_del.php index 7260b2d2..23692af8 100755 --- a/bureau/admin/mail_del.php +++ b/bureau/admin/mail_del.php @@ -47,20 +47,12 @@ if ($confirm=="y") { continue; } - // Search for that address: - $db->query("SELECT a.id, NOT ISNULL(m.id) AS islocal FROM address a LEFT JOIN mailbox m ON m.address_id=a.id WHERE a.id= ? ;", array($val)); - - if (!$db->next_record()) { - $msg->raise("ERROR", "mail", _("The email %s does not exist, it can't be deleted"), $email); - continue; - } - if ($mail->delete($val)) { - if ($db->f("islocal")) { - $msg->raise("INFO", "mail", _("The email %s has been marked for deletion"), $email); - } else { - $msg->raise("INFO", "mail", _("The email %s has been successfully deleted"), $email); - } + if ($db->f("islocal")) { + $msg->raise("INFO", "mail", _("The email %s has been marked for deletion"), $email); + } else { + $msg->raise("INFO", "mail", _("The email %s has been successfully deleted"), $email); + } } } include("mail_list.php");