From 08010fae5c22df095d177ae998afa7f05acf68ee Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 23 Nov 2022 19:51:17 +0100 Subject: [PATCH] Limit booth suggest on public page by ip adress --- htdocs/comm/action/class/actioncomm.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index fb78c8d1af5..58ab4503dc5 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -555,7 +555,8 @@ class ActionComm extends CommonObject $sql .= "recurdateend,"; $sql .= "num_vote,"; $sql .= "event_paid,"; - $sql .= "status"; + $sql .= "status,"; + $sql .= "ip"; $sql .= ") VALUES ("; $sql .= "'(PROV)', "; $sql .= "'".$this->db->idate($now)."', "; @@ -596,7 +597,8 @@ class ActionComm extends CommonObject $sql .= (!empty($this->recurdateend) ? "'".$this->db->idate($this->recurdateend)."'" : "null").", "; $sql .= (!empty($this->num_vote) ? (int) $this->num_vote : "null").", "; $sql .= (!empty($this->event_paid) ? (int) $this->event_paid : 0).", "; - $sql .= (!empty($this->status) ? (int) $this->status : "0"); + $sql .= (!empty($this->status) ? (int) $this->status : "0").", "; + $sql .= (!empty($this->ip) ? "'".$this->db->escape($this->ip)."'" : "null"); $sql .= ")"; dol_syslog(get_class($this)."::add", LOG_DEBUG);