From bdc13fba0d6989e23154d569a80e445ebec419fd Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 30 Jan 2015 15:05:03 -0600 Subject: [PATCH] thread: Remove collaborators when removing the thread --- include/class.thread.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/class.thread.php b/include/class.thread.php index 8564e249a..dc8a559e1 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -200,10 +200,18 @@ class Thread { return false; $this->deleteAttachments(); + $this->removeCollaborators(); return true; } + function removeCollaborators() { + $sql='DELETE FROM '.TICKET_COLLABORATOR_TABLE + .' WHERE ticket_id='.db_input($this->getTicketId()); + + return (db_query($sql) && db_affected_rows()); + } + /* static */ function lookup($ticket) { -- GitLab