From 2f7d6afc6ea51f43d3dbeefa5438f0842cdeb8ea Mon Sep 17 00:00:00 2001 From: Jon Bendtsen Date: Sat, 16 Mar 2024 10:57:53 +0100 Subject: [PATCH] escaping type and reorder the field order to reduce line length --- htdocs/core/class/notify.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 498baaabd3b..5d2e8678a5d 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -295,9 +295,9 @@ class Notify $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (fk_soc, fk_action, type, fk_contact, datec)"; - $sql .= " VALUES (".((int) $this->socid).", ".((int) $this->event).", '".$this->type."',"; - $sql .= " ".((int) $this->target).",'".$this->db->idate($this->datec)."')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (fk_soc, fk_action, fk_contact, type, datec)"; + $sql .= " VALUES (".((int) $this->socid).", ".((int) $this->event).", ".((int) $this->target).","; + $sql .= "'".$this->db->escape($this->type)."', '".$this->db->idate($this->datec)."')"; $resql = $this->db->query($sql); if ($resql) { if ($this->db->affected_rows($resql)) {