[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Email: Corrected formatting of References header to use a comma separator

"UshindiG \(@GedeonTS\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68cecf8999ff7_2cdc2bfc63365@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f6c4ccb95-tzxtk.mail>

UshindiG pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
eac9e22a by UshindiG at 2025-09-20T18:53:33+03:00
[FIX] Email: Corrected formatting of References header to use a comma separator
---
* [FIX] Email: Corrected formatting of References header to use a comma separator
---
* [FIX][TEST] EmailTest: Corrected References header formatting to use comma separator

* [FIX] Email: Corrected formatting of References header to use a comma separator

See merge request tikiwiki/tiki!8606

(cherry picked from commit 2aece903d177924184ba3add8f1449c8812023e2)

See merge request tikiwiki/tiki!8614

- - - - -


2 changed files:

- lib/core/Notifications/Email.php
- lib/test/core/Notifications/EmailTest.php


Changes:

=====================================
lib/core/Notifications/Email.php
=====================================
@@ -52,7 +52,7 @@ class Email
 
         if ($prefs['forum_notifications_use_new_threads'] === 'n') {
             $headers['In-Reply-To'] = ! empty($parentInfo['Message-Id']) ? $parentInfo['Message-Id'] : null;
-            $headers['References'] = ! empty($parentInfo['References']) ? $parentInfo['References'] . ' ' . $headers['In-Reply-To'] : $hash;
+            $headers['References'] = ! empty($parentInfo['References']) ? $parentInfo['References'] . ',' . $headers['In-Reply-To'] : $hash;
         } else {
             $headers['In-Reply-To'] = $comment['in_reply_to'];
         }


=====================================
lib/test/core/Notifications/EmailTest.php
=====================================
@@ -99,7 +99,7 @@ class EmailTest extends TestCase
 
         $this->assertEquals($messageId2, $headers2['Message-Id']);
         $this->assertEquals($messageId, $headers2['In-Reply-To']);
-        $this->assertEquals($md5Header . ' ' . $messageId, $headers2['References']);
+        $this->assertEquals($md5Header . ',' . $messageId, $headers2['References']);
 
         //3rd post in same thread (no reply):
         $messageId3 = '';
@@ -142,7 +142,7 @@ class EmailTest extends TestCase
 
         $this->assertEquals($messageId4, $headers4['Message-Id']);
         $this->assertEquals($messageId2, $headers4['In-Reply-To']);
-        $this->assertEquals($md5Header . ' ' . $messageId . ' ' . $messageId2, $headers4['References']);
+        $this->assertEquals($md5Header . ',' . $messageId . ',' . $messageId2, $headers4['References']);
     }
 
     /**
@@ -209,7 +209,7 @@ class EmailTest extends TestCase
 
         $this->assertEquals($messageId2, $headers2['Message-Id']);
         $this->assertEquals($messageId, $headers2['In-Reply-To']);
-        $this->assertEquals($md5Header . ' ' . $messageId, $headers2['References']);
+        $this->assertEquals($md5Header . ',' . $messageId, $headers2['References']);
 
         //3rd comment (no reply to other comment):
         $messageId3 = '';
@@ -251,6 +251,6 @@ class EmailTest extends TestCase
 
         $this->assertEquals($messageId4, $headers4['Message-Id']);
         $this->assertEquals($messageId2, $headers4['In-Reply-To']);
-        $this->assertEquals($md5Header . ' ' . $messageId . ' ' . $messageId2, $headers4['References']);
+        $this->assertEquals($md5Header . ',' . $messageId . ',' . $messageId2, $headers4['References']);
     }
 }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/eac9e22a4d1c20e4a0fdf198a5cbee3f5110e04c

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/eac9e22a4d1c20e4a0fdf198a5cbee3f5110e04c
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.