From 7f0188251d38d0a75b7137af98686459ea09f28e Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 4 Apr 2014 14:03:51 -0500
Subject: [PATCH] oops: Fix missing 2nd param to ::lookupByMessageId

---
 include/class.thread.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/class.thread.php b/include/class.thread.php
index fb180a767..a2a7cb91c 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -891,8 +891,9 @@ Class ThreadEntry {
         // Search for the message-id token in the body
         if (preg_match('`(?:data-mid="|Ref-Mid: )([^"\s]*)(?:$|")`',
                 $mailinfo['message'], $match))
-            if ($thread = ThreadEntry::lookupByMessageId($match[1]))
-                   return $thread;
+            if ($thread = ThreadEntry::lookupByRefMessageId($match[1],
+                    $mailinfo['email']))
+                return $thread;
 
         return null;
     }
@@ -901,7 +902,7 @@ Class ThreadEntry {
      * Find a thread entry from a message-id created from the
      * ::asMessageId() method
      */
-    function lookupByMessageId($mid, $from) {
+    function lookupByRefMessageId($mid, $from) {
         $mid = trim($mid, '<>');
         list($ver, $ids, $mails) = explode('$', $mid, 3);
 
@@ -923,8 +924,8 @@ Class ThreadEntry {
 
     /**
      * Get an email message-id that can be used to represent this thread
-     * entry. The same message-id can be passed to ::lookupByMessageId() to
-     * find this thread entry
+     * entry. The same message-id can be passed to ::lookupByRefMessageId()
+     * to find this thread entry
      *
      * Formats:
      * Initial (version <null>)
-- 
GitLab