Break words in subject truncation of email log
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 10 May 2021 10:18:08 +0000 (12:18 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 10 May 2021 10:21:31 +0000 (12:21 +0200)
wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php

index 34f4c91db14a23e786d55537729d193e3ae1cfb2..942a6b7a532b39a17a3558608673be1939862c76 100644 (file)
@@ -87,7 +87,12 @@ class EmailDeliveryBackgroundJob extends AbstractBackgroundJob
             'data' => [
                 'time' => \TIME_NOW,
                 'messageID' => $this->email->getMessageID(),
-                'subject' => StringUtil::truncate($this->email->getSubject(), 20),
+                'subject' => StringUtil::truncate(
+                    $this->email->getSubject(),
+                    20,
+                    StringUtil::HELLIP,
+                    false
+                ),
                 'recipient' => $this->envelopeTo->getAddress(),
                 'recipientID' => ($this->envelopeTo instanceof UserMailbox) ? $this->envelopeTo->getUser()->userID : null,
                 'status' => EmailLogEntry::STATUS_NEW,