Index: branches/5.0.x/core/units/helpers/language_import_helper.php =================================================================== diff -u -r12306 -r12400 --- branches/5.0.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 12306) +++ branches/5.0.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 12400) @@ -1,6 +1,6 @@ Application->recallObject('EmailMessageHelper'); + /* @var $email_message_helper EmailMessageHelper */ + do { $event_id = $this->_getEventId($event_node->Attributes['EVENT'], $event_node->Attributes['TYPE']); if ($event_id) { @@ -529,11 +532,17 @@ $fields_hash['Template'] = base64_decode($event_node->Data); } + $parsed = $email_message_helper->parseTemplate($fields_hash['Template']); + $fields_hash['Subject'] = $parsed['Subject']; + $this->Conn->doInsert($fields_hash, $this->_tables['emailmessages'], 'INSERT', false); } } while (($event_node =& $event_node->NextSibling())); - $this->Conn->doInsert($fields_hash, $this->_tables['emailmessages'], 'INSERT'); + if ($fields_hash) { + // at least one corresponding event declaration found by email event name+type given in translation + $this->Conn->doInsert($fields_hash, $this->_tables['emailmessages'], 'INSERT'); + } } /**