From 88760a66a8320f7186b08216073c3a5b966318f4 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 15 Jan 2014 10:20:43 -0600 Subject: [PATCH] Don't fetch ticket thread unless necessary --- include/class.ticket.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/class.ticket.php b/include/class.ticket.php index 7c816ff80..f32cfbd86 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -98,9 +98,6 @@ class Ticket { $this->topic = null; $this->thread = null; - //REQUIRED: Preload thread obj - checked on lookup! - $this->getThread(); - return true; } @@ -1788,8 +1785,7 @@ class Ticket { return ($id && is_numeric($id) && ($ticket= new Ticket($id)) - && $ticket->getId()==$id - && $ticket->getThread()) + && $ticket->getId()==$id) ?$ticket:null; } -- GitLab