From 450cbbb76dce3d6ca41cc044060edcba25522828 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Dec 2023 14:35:40 +0100 Subject: [PATCH] FIX can edit reminders on past events --- htdocs/comm/action/class/actioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 0070f96fc68..df388d7b5fa 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2497,7 +2497,7 @@ class ActionComm extends CommonObject //Select all action comm reminders $sql = "SELECT rowid as id FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; $sql .= " WHERE typeremind = 'email'"; - $sql .= " AND status <= 0"; // 0=No yet sent, -1=Error + $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. $sql .= " AND dateremind <= '".$this->db->idate($now)."'"; $sql .= " AND entity IN (".getEntity('actioncomm').")"; $sql .= $this->db->order("dateremind", "ASC"); @@ -2568,7 +2568,7 @@ class ActionComm extends CommonObject if ($cMailFile->sendfile()) { $nbMailSend++; } else { - $errormesg = $cMailFile->error.' : '.$to; + $errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.join(',', $cMailFile->errors); $error++; } }