From b269af5bf602b040a34742852d46ee472d0ec60f Mon Sep 17 00:00:00 2001 From: atm-greg Date: Thu, 24 Sep 2020 15:26:35 +0200 Subject: [PATCH] delete reminders on ActionComm::delete --- htdocs/comm/action/class/actioncomm.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 113f860962f..c6fd2183459 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -925,6 +925,18 @@ class ActionComm extends CommonObject } } + if (!$error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; + $sql .= " WHERE fk_actioncomm = ".$this->id; + + $res = $this->db->query($sql); + if (!$res) { + $this->error = $this->db->lasterror(); + $error++; + } + } + // Removed extrafields if (!$error) { $result = $this->deleteExtraFields();