From: Tim Düsterhus Date: Mon, 15 Feb 2021 13:58:50 +0000 (+0100) Subject: Add subject to email log X-Git-Tag: 5.4.0_Alpha_1~252^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cba897de89b67b01084f79d0169b7edef2a31068;p=GitHub%2FWoltLab%2FWCF.git Add subject to email log --- diff --git a/wcfsetup/install/files/acp/templates/emailLogList.tpl b/wcfsetup/install/files/acp/templates/emailLogList.tpl index 51cc014cac..231ce7b907 100644 --- a/wcfsetup/install/files/acp/templates/emailLogList.tpl +++ b/wcfsetup/install/files/acp/templates/emailLogList.tpl @@ -28,7 +28,7 @@ {lang}wcf.global.objectID{/lang} - {lang}wcf.acp.email.log.messageID{/lang} + {lang}wcf.acp.email.log.subject{/lang} {lang}wcf.user.email{/lang} {lang}wcf.acp.email.log.time{/lang} {lang}wcf.acp.email.log.status{/lang} @@ -42,7 +42,8 @@ {@$entry->entryID} - {$entry->getFormattedMessageId()|truncate:50} + {$entry->subject}
+ {$entry->getFormattedMessageId()|truncate:50} {if $__wcf->session->getPermission('admin.user.canEditMailAddress')} diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_db.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_db.php index 7809379b55..36a2784b88 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_db.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_db.php @@ -35,6 +35,7 @@ $tables = [ ObjectIdDatabaseTableColumn::create('entryID'), NotNullInt10DatabaseTableColumn::create('time'), NotNullVarchar255DatabaseTableColumn::create('messageID'), + NotNullVarchar255DatabaseTableColumn::create('subject'), NotNullVarchar255DatabaseTableColumn::create('recipient'), IntDatabaseTableColumn::create('recipientID') ->length(10) diff --git a/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php b/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php index 4718361624..9307d1d5e9 100644 --- a/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php +++ b/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php @@ -9,6 +9,7 @@ use wcf\system\email\Mailbox; use wcf\system\email\transport\exception\PermanentFailure; use wcf\system\email\transport\IStatusReportingEmailTransport; use wcf\system\email\UserMailbox; +use wcf\util\StringUtil; /** * Delivers the given email to the given mailbox. @@ -86,6 +87,7 @@ class EmailDeliveryBackgroundJob extends AbstractBackgroundJob 'data' => [ 'time' => \TIME_NOW, 'messageID' => $this->email->getMessageID(), + 'subject' => StringUtil::truncate($this->email->getSubject(), 30), 'recipient' => $this->envelopeTo->getAddress(), 'recipientID' => ($this->envelopeTo instanceof UserMailbox) ? $this->envelopeTo->getUser()->userID : null, 'status' => EmailLogEntry::STATUS_NEW, diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 6d3fb2a99b..0cf67a0e0c 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -630,7 +630,7 @@ - + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index ae9b8b19be..71146eb68c 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -606,7 +606,7 @@ - + diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 9c4d5eae4f..5ae64deec4 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -556,6 +556,7 @@ CREATE TABLE wcf1_email_log_entry ( entryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, time INT(10) NOT NULL, messageID VARCHAR(255) NOT NULL, + subject VARCHAR(255) NOT NULL, recipient VARCHAR(255) NOT NULL, recipientID INT(10) DEFAULT NULL, status VARCHAR(255) NOT NULL,