* eMail/Filemanager: when saving mail to filemanager, add headerdata without subject to file - comment field

This commit is contained in:
Klaus Leithoff 2013-08-16 09:05:20 +00:00
parent 183a326cb0
commit 19dd7ccf21
2 changed files with 18 additions and 5 deletions

View File

@ -4914,7 +4914,7 @@ class felamimail_bo
/**
* createHeaderInfoSection - creates a textual headersection from headerobject
* @param array header headerarray may contain SUBJECT,FROM,SENDER,TO,CC,BCC,DATE,PRIORITY,IMPORTANCE
* @param string headline Text tom use for headline
* @param string headline Text tom use for headline, if SUPPRESS, supress headline and footerline
* @param bool createHTML do it with HTML breaks
* @return string a preformatted string with the information of the header worked into it
*/
@ -4933,13 +4933,13 @@ class felamimail_bo
//if ($mailcontent['headers']['ORGANIZATION']) $headdata .= lang('organization').': '.$mailcontent['headers']['ORGANIZATION']."\
if (!empty($headdata))
{
if (!empty($headline)) $headdata = "---------------------------- $headline ----------------------------".($createHTML?"<br />":"\n").$headdata;
if (empty($headline)) $headdata = "--------------------------------------------------------".($createHTML?"<br />":"\n").$headdata;
$headdata .= "--------------------------------------------------------".($createHTML?"<br />":"\n");
if (!empty($headline) && $headline != 'SUPPRESS') $headdata = "---------------------------- $headline ----------------------------".($createHTML?"<br />":"\n").$headdata;
if (empty($headline)) $headdata = ($headline != 'SUPPRESS'?"--------------------------------------------------------".($createHTML?"<br />":"\n"):'').$headdata;
$headdata .= ($headline != 'SUPPRESS'?"--------------------------------------------------------".($createHTML?"<br />":"\n"):'');
}
else
{
$headdata = "--------------------------------------------------------".($createHTML?"<br />":"\n");
$headdata = ($headline != 'SUPPRESS'?"--------------------------------------------------------".($createHTML?"<br />":"\n"):'');
}
return $headdata;
}

View File

@ -1358,8 +1358,21 @@ blockquote[type=cite] {
!fwrite($fp,$message))
{
$err .= 'alert("'.addslashes(lang('Error saving %1!',$file)).'");';
$succeeded = false;
}
else
{
$succeeded = true;
}
if ($fp) fclose($fp);
if ($succeeded)
{
$headers = $this->bofelamimail->getMessageHeader($this->uid,$partID,true);
unset($headers['SUBJECT']);//already in filename
$infoSection = felamimail_bo::createHeaderInfoSection($headers, 'SUPPRESS', false);
$props = array(array('name' => 'comment','val' => $infoSection));
egw_vfs::proppatch($file,$props);
}
}
$this->bofelamimail->closeConnection();