no usage in admin/ of the panel. Useless anyway since is_it_my_mail() check it already

This commit is contained in:
Benjamin Sonntag 2017-10-06 19:12:00 +02:00
parent c710f94d62
commit 1f4ea5d132
1 changed files with 5 additions and 13 deletions

View File

@ -47,20 +47,12 @@ if ($confirm=="y") {
continue; 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 ($mail->delete($val)) {
if ($db->f("islocal")) { if ($db->f("islocal")) {
$msg->raise("INFO", "mail", _("The email %s has been marked for deletion"), $email); $msg->raise("INFO", "mail", _("The email %s has been marked for deletion"), $email);
} else { } else {
$msg->raise("INFO", "mail", _("The email %s has been successfully deleted"), $email); $msg->raise("INFO", "mail", _("The email %s has been successfully deleted"), $email);
} }
} }
} }
include("mail_list.php"); include("mail_list.php");