Index: branches/5.1.x/core/units/helpers/language_import_helper.php =================================================================== diff -u -N -r13168 -r13276 --- branches/5.1.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 13168) +++ branches/5.1.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 13276) @@ -1,6 +1,6 @@ _languages as $language_id) { $this->_performUpgrade($language_id, 'phrases', 'PhraseKey', Array ('l%s_Translation')); - $this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'l%s_Body')); + $this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'MessageType', 'l%s_Body')); } $this->_initImportTables(true); Index: branches/5.1.x/core/units/helpers/email_message_helper.php =================================================================== diff -u -N -r13151 -r13276 --- branches/5.1.x/core/units/helpers/email_message_helper.php (.../email_message_helper.php) (revision 13151) +++ branches/5.1.x/core/units/helpers/email_message_helper.php (.../email_message_helper.php) (revision 13276) @@ -12,9 +12,9 @@ { $ret = Array ('Subject' => '', 'Headers' => '', 'Body' => ''); $headers = Array(); - $lines = explode("\n", $text); + $lines = explode("\n", $text); // "\n" is lost in process - foreach ($lines as $line) { + foreach ($lines as $line_id => $line) { if (strlen(trim($line)) == 0 || ($line == '.')) { break; } @@ -30,12 +30,10 @@ $ret['Headers'] = implode("\n", $headers); - $message_body = ''; - while ((list($line_id, $line) = each($lines))) { - $message_body .= $line; - } + $lines = array_slice($lines, $line_id + 1); - $ret['Body'] = $message_body; + // add "\n", that was lost before + $ret['Body'] = implode("\n", $lines); return $ret; }