From f362c66b28967a1da925edfa4204285c9eeb2aa1 Mon Sep 17 00:00:00 2001 From: Maximilien Rozniecki Date: Wed, 1 Mar 2023 16:54:49 +0100 Subject: [PATCH] changed by ->db inside ticket.class.php --- htdocs/ticket/class/ticket.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index ce0997c7a02..09c9c07977f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -3038,7 +3038,7 @@ class Ticket extends CommonObject */ public function removeClosedContact($to) { - global $db, $langs; + global $langs; $langs->load("ticket"); if (isset($this->id)) { @@ -3048,11 +3048,11 @@ class Ticket extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople sc on (ec.fk_socpeople = sc.rowid AND tc.source = 'external')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u on (ec.fk_socpeople = u.rowid AND tc.source = 'internal')"; $sql .= " WHERE IF(tc.source = 'external', sc.statut = 1, u.statut = 1)"; - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); for ($i = 0; $num > $i; $i++) { - $non_closed_contacts[] = $db->fetch_row($resql); + $non_closed_contacts[] = $this->db->fetch_row($resql); } } $to = array_filter($to, function($v, $k) use($non_closed_contacts, $langs) {