From 4512d4b484a9bb7c92c00e4ee146f6ff2bfaf09a Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 29 Sep 2016 14:46:31 -0300 Subject: [PATCH] Ivan - Create Ticket::addEvent function [skip ci] --- server/controllers/ticket/comment.php | 2 +- server/models/Ticket.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/controllers/ticket/comment.php b/server/controllers/ticket/comment.php index cbf077ed..83fb5513 100644 --- a/server/controllers/ticket/comment.php +++ b/server/controllers/ticket/comment.php @@ -56,7 +56,7 @@ class CommentController extends Controller { $comment->authorUser = Controller::getLoggedUser(); } - $this->ticket->ownTicketeventList->add($comment); + $this->ticket->addEvent($comment); $this->ticket->store(); } } \ No newline at end of file diff --git a/server/models/Ticket.php b/server/models/Ticket.php index 808d36fd..b2c73b2d 100644 --- a/server/models/Ticket.php +++ b/server/models/Ticket.php @@ -132,4 +132,8 @@ class Ticket extends DataStore { return $events; } + + public function addEvent(Ticketevent $event) { + $this->ownTicketeventList->add($event); + } }