Skip to content

Commit

Permalink
Delete auto responder chat if auto responder is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Sep 22, 2023
1 parent 1edc815 commit dd3ce00
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public function afterRemove()
$stmt = $db->prepare('DELETE FROM `lh_abstract_auto_responder_dep` WHERE `autoresponder_id` = :autoresponder_id');
$stmt->bindValue(':autoresponder_id', $this->id,PDO::PARAM_INT);
$stmt->execute();

$db = ezcDbInstance::get();
$stmt = $db->prepare('DELETE FROM `lh_abstract_auto_responder_chat` WHERE `auto_responder_id` = :auto_responder_id');
$stmt->bindValue(':auto_responder_id', $this->id,PDO::PARAM_INT);
$stmt->execute();
}

public function customForm() {
Expand Down

0 comments on commit dd3ce00

Please sign in to comment.