Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803922
D412.id1021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 9:01 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:01 AM (7 h, 35 m)
Engine
blob
Format
Raw Data
Handle
576642
Attached To
D412: INP-1808 - Create "E-mail Log" records using corresponding unit
D412.id1021.diff
View Options
Index: core/kernel/utility/email_send.php
===================================================================
--- core/kernel/utility/email_send.php
+++ core/kernel/utility/email_send.php
@@ -1213,6 +1213,7 @@
$this->SetCharset(null, true);
$this->_logData = Array ();
+ $this->Application->removeObject('email-log');
}
/**
@@ -2132,8 +2133,17 @@
$result = $this->$send_method($message_headers, $message_body);
if ( $result && $this->_logData ) {
- // add e-mail log record
- $this->Conn->doInsert($this->_logData, TABLE_PREFIX . 'EmailLog');
+ /** @var kDBItem $email_log */
+ $email_log = $this->Application->recallObject(
+ 'email-log',
+ null,
+ array('skip_autoload' => true)
+ );
+
+ $email_log->Clear();
+ $email_log->SetDBFieldsFromHash($this->_logData);
+ $email_log->UpdateFormattersSubFields();
+ $email_log->Create();
}
if ( $immediate_clear ) {
Index: core/units/logs/email_logs/email_logs_config.php
===================================================================
--- core/units/logs/email_logs/email_logs_config.php
+++ core/units/logs/email_logs/email_logs_config.php
@@ -90,7 +90,7 @@
'default' => NULL
),
'EventParams' => Array ('type' => 'string', 'default' => NULL),
- 'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
+ 'AccessKey' => Array ('type' => 'string', 'max_len' => 32, 'not_null' => 1, 'default' => ''),
),
'Grids' => Array (
Event Timeline
Log In to Comment