Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F802416
D412.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
Sun, Feb 23, 9:46 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Mon, Feb 24, 9:46 PM (12 h, 18 m)
Engine
blob
Format
Raw Data
Handle
575346
Attached To
D412: INP-1808 - Create "E-mail Log" records using corresponding unit
D412.diff
View Options
Index: branches/5.2.x/core/kernel/utility/email_send.php
===================================================================
--- branches/5.2.x/core/kernel/utility/email_send.php
+++ branches/5.2.x/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: branches/5.2.x/core/units/logs/email_logs/email_logs_config.php
===================================================================
--- branches/5.2.x/core/units/logs/email_logs/email_logs_config.php
+++ branches/5.2.x/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