From f9c955d7ccf8189f3e89cad1e6a396a190b16ff4 Mon Sep 17 00:00:00 2001
From: aydreeihn <adriane@enhancesoft.com>
Date: Mon, 6 Aug 2018 14:52:12 -0500
Subject: [PATCH] Referral Assignment Issue:

This commit fixes an issue where referrals were being considered successfully saved even if that referral already existed, resulting in multiple thread events for the same referral.

Instead, if we find that the thread is already referred to the referee, refer should return false so that an error message is displayed stating that we were unable to refer the ticket.
---
 include/class.thread.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.thread.php b/include/class.thread.php
index 8bb321eed..14da0952d 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -314,7 +314,7 @@ implements Searchable {
     function refer($to) {
 
         if ($this->isReferred($to, true))
-            return true;
+            return false;
 
         $vars = array('thread_id' => $this->getId());
         switch (true) {
-- 
GitLab