mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
fix for rare problem on toggle html2text resulting in empty content; preparation for REFERENCES and IN-REPLY-TO
This commit is contained in:
parent
491e0002ca
commit
bc9ee4170d
@ -479,12 +479,15 @@ class mail_compose
|
||||
if (stripos($content['mail_htmltext'],'<pre>')!==false)
|
||||
{
|
||||
$contentArr = html::splithtmlByPRE($content['mail_htmltext']);
|
||||
if (is_array($contentArr))
|
||||
{
|
||||
foreach ($contentArr as $k =>&$elem)
|
||||
{
|
||||
if (stripos($elem,'<pre>')!==false) $elem = str_replace(array("\r\n","\n","\r"),array("<br>","<br>","<br>"),$elem);
|
||||
}
|
||||
$content['mail_htmltext'] = implode('',$contentArr);
|
||||
}
|
||||
}
|
||||
$content['mail_htmltext'] = $this->_getCleanHTML($content['mail_htmltext'], false, false);
|
||||
$content['mail_htmltext'] = translation::convertHTMLToText($content['mail_htmltext'],$charset=false,$stripcrl=false,$stripalltags=true);
|
||||
|
||||
@ -1305,6 +1308,8 @@ class mail_compose
|
||||
$preserv['serverID'] = $content['serverID'];
|
||||
$preserv['lastDrafted'] = $content['lastDrafted'];
|
||||
$preserv['processedmail_id'] = $content['processedmail_id'];
|
||||
$preserv['references'] = $content['references'];
|
||||
$preserv['in-reply-to'] = $content['in-reply-to'];
|
||||
$preserv['mode'] = $content['mode'];
|
||||
// convert it back to checkbox expectations
|
||||
if($content['mimeType'] == 'html') {
|
||||
@ -1945,7 +1950,8 @@ class mail_compose
|
||||
//$headers = $mail_bo->getMessageHeader($_uid, $_partID, true, true, $_folder);
|
||||
$this->sessionData['uid'] = $_uid;
|
||||
$this->sessionData['messageFolder'] = $_folder;
|
||||
$this->sessionData['in-reply-to'] = $headers['MESSAGE_ID'];
|
||||
$this->sessionData['in-reply-to'] = ($headers['IN-REPLY-TO']?$headers['IN-REPLY-TO']:$headers['MESSAGE_ID']);
|
||||
$this->sessionData['references'] = ($headers['REFERENCES']?$headers['REFERENCES']:$headers['MESSAGE_ID']);
|
||||
//error_log(__METHOD__.__LINE__.' Mode:'.$_mode.':'.array2string($headers));
|
||||
// check for Reply-To: header and use if available
|
||||
if(!empty($headers['REPLY-TO']) && ($headers['REPLY-TO'] != $headers['FROM'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user