From c0545aa9ccf54fefe135fc5e84b106e0ddfde547 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Sun, 17 Jan 2010 17:34:28 +0000 Subject: [PATCH] - Log the 'From' field for email notifications SVN:trunk[260] --- core/action.class.inc.php | 1 + core/event.class.inc.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/action.class.inc.php b/core/action.class.inc.php index 51cee9af5..ccd747e95 100644 --- a/core/action.class.inc.php +++ b/core/action.class.inc.php @@ -231,6 +231,7 @@ class ActionEmail extends ActionNotification $oLog->Set('trigger_id', $oTrigger->GetKey()); $oLog->Set('action_id', $this->GetKey()); $oLog->Set('object_id', $aContextArgs['this->id']); + $oLog->Set('from', $sFrom); $oLog->Set('to', $sTo); $oLog->Set('cc', $sCC); $oLog->Set('bcc', $sBCC); diff --git a/core/event.class.inc.php b/core/event.class.inc.php index 79b2efbe0..77a164892 100644 --- a/core/event.class.inc.php +++ b/core/event.class.inc.php @@ -112,13 +112,14 @@ class EventNotificationEmail extends EventNotification MetaModel::Init_AddAttribute(new AttributeText("to", array("label"=>"TO", "description"=>"TO", "allowed_values"=>null, "sql"=>"to", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("cc", array("label"=>"CC", "description"=>"CC", "allowed_values"=>null, "sql"=>"cc", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("bcc", array("label"=>"BCC", "description"=>"BCC", "allowed_values"=>null, "sql"=>"bcc", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeText("from", array("label"=>"From", "description"=>"Sender of the message", "allowed_values"=>null, "sql"=>"from", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("subject", array("label"=>"Subject", "description"=>"Subject", "allowed_values"=>null, "sql"=>"subject", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("body", array("label"=>"Body", "description"=>"Body", "allowed_values"=>null, "sql"=>"body", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_InheritFilters(); // Display lists - MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'trigger_id', 'action_id', 'object_id', 'to', 'cc', 'bcc', 'subject', 'body')); // Attributes to be displayed for the complete details + MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'trigger_id', 'action_id', 'object_id', 'from', 'to', 'cc', 'bcc', 'subject', 'body')); // Attributes to be displayed for the complete details MetaModel::Init_SetZListItems('list', array('date', 'userinfo', 'subject')); // Attributes to be displayed for a list // Search criteria // MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form