From c76c2e0d3ec31f2bf6e5e07c1f90bd5c3f519350 Mon Sep 17 00:00:00 2001 From: madx666 Date: Wed, 7 Nov 2018 10:08:38 +0100 Subject: [PATCH 1/2] Fix newMessagePublic for ticket module --- htdocs/ticket/class/actions_ticket.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 7e8ae39564a..09326b23798 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -827,6 +827,7 @@ class ActionsTicket global $mysoc, $conf, $langs; + $object = new Ticket($this->db); $error = 0; $ret = $object->fetch('', '', GETPOST('track_id','alpha')); $object->socid = $object->fk_soc; From 2ff69bb3fc315c1fa5fede5bc555d2740d23f909 Mon Sep 17 00:00:00 2001 From: madx666 Date: Wed, 7 Nov 2018 10:11:28 +0100 Subject: [PATCH 2/2] Fix viewTicketMessages for ticket module --- htdocs/ticket/class/actions_ticket.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 09326b23798..fc1f1a88012 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -1204,15 +1204,14 @@ class ActionsTicket public function viewTicketMessages($show_private, $show_user = true) { global $conf, $langs, $user; - global $object; // Load logs in cache - $ret = $object->loadCacheMsgsTicket(); + $ret = $this->dao->loadCacheMsgsTicket(); $action = GETPOST('action'); $this->viewTicketOriginalMessage($user, $action); - if (is_array($object->cache_msgs_ticket) && count($object->cache_msgs_ticket) > 0) { + if (is_array($this->dao->cache_msgs_ticket) && count($this->dao->cache_msgs_ticket) > 0) { print_titre($langs->trans('TicketMailExchanges')); print ''; @@ -1229,7 +1228,7 @@ class ActionsTicket print ''; } - foreach ($object->cache_msgs_ticket as $id => $arraymsgs) { + foreach ($this->dao->cache_msgs_ticket as $id => $arraymsgs) { if (!$arraymsgs['private'] || ($arraymsgs['private'] == "1" && $show_private) ) {