mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
*Infolog: Feature; import_mail; Prepend the Message HeaderData in Front of the infolog Text. That way Headerinformation is preserved, when the Infolog is altered in Type, Link, Adresses or Startdate; funded by Knauber
This commit is contained in:
parent
02c6955326
commit
6a25f137f7
@ -1327,6 +1327,8 @@ class infolog_ui
|
|||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog').' - '.
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog').' - '.
|
||||||
($content['status_only'] ? lang('Edit Status') : lang('Edit'));
|
($content['status_only'] ? lang('Edit Status') : lang('Edit'));
|
||||||
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => ($info_id ? 'ManualInfologEdit' : 'ManualInfologAdd'));
|
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => ($info_id ? 'ManualInfologEdit' : 'ManualInfologAdd'));
|
||||||
|
//error_log(substr($content['info_des'],1793,10));
|
||||||
|
//$content['info_des'] = substr($content['info_des'],0,1793);
|
||||||
//echo "<p>infolog_ui.edit(info_id='$info_id',action='$action',action_id='$action_id') readonlys="; print_r($readonlys); echo ", content = "; _debug_array($content);
|
//echo "<p>infolog_ui.edit(info_id='$info_id',action='$action',action_id='$action_id') readonlys="; print_r($readonlys); echo ", content = "; _debug_array($content);
|
||||||
$this->tmpl->exec('infolog.infolog_ui.edit',$content,array(
|
$this->tmpl->exec('infolog.infolog_ui.edit',$content,array(
|
||||||
'info_type' => $types,
|
'info_type' => $types,
|
||||||
@ -1581,6 +1583,8 @@ class infolog_ui
|
|||||||
$subject = $bofelamimail->decode_header($headers['SUBJECT']);
|
$subject = $bofelamimail->decode_header($headers['SUBJECT']);
|
||||||
|
|
||||||
$message = self::getdisplayableBody($bofelamimail, $bodyParts);
|
$message = self::getdisplayableBody($bofelamimail, $bodyParts);
|
||||||
|
$headdata = self::createHeaderInfoSection($headers);
|
||||||
|
$message = $headdata.$message;
|
||||||
//echo __METHOD__.'<br>';
|
//echo __METHOD__.'<br>';
|
||||||
//_debug_array($attachments);
|
//_debug_array($attachments);
|
||||||
if (is_array($attachments))
|
if (is_array($attachments))
|
||||||
@ -1596,16 +1600,7 @@ class infolog_ui
|
|||||||
$headdata ='';
|
$headdata ='';
|
||||||
if ($mailcontent['headers'])
|
if ($mailcontent['headers'])
|
||||||
{
|
{
|
||||||
if ($mailcontent['headers']['SUBJECT']) $headdata = lang('subject').': '.$mailcontent['headers']['SUBJECT']."\n";
|
$headdata = self::createHeaderInfoSection($mailcontent['headers']);
|
||||||
if ($mailcontent['headers']['FROM']) $headdata .= lang('from').': '.$mailcontent['headers']['FROM']."\n";
|
|
||||||
if ($mailcontent['headers']['SENDER']) $headdata .= lang('sender').': '.$mailcontent['headers']['SENDER']."\n";
|
|
||||||
if ($mailcontent['headers']['TO']) $headdata .= lang('to').': '.$mailcontent['headers']['TO']."\n";
|
|
||||||
if ($mailcontent['headers']['CC']) $headdata .= lang('cc').': '.$mailcontent['headers']['CC']."\n";
|
|
||||||
if ($mailcontent['headers']['DATE']) $headdata .= lang('date').': '.$mailcontent['headers']['DATE']."\n";
|
|
||||||
if ($mailcontent['headers']['PRIORITY'] && $mailcontent['headers']['PRIORITY'] != 'normal') $headdata .= lang('priority').': '.$mailcontent['headers']['PRIORITY']."\n";
|
|
||||||
if ($mailcontent['headers']['IMPORTANCE'] && $mailcontent['headers']['IMPORTANCE'] !='normal') $headdata .= lang('importance').': '.$mailcontent['headers']['IMPORTANCE']."\n";
|
|
||||||
//if ($mailcontent['headers']['ORGANIZATION']) $headdata .= lang('organization').': '.$mailcontent['headers']['ORGANIZATION']."\n";
|
|
||||||
if (!empty($headdata)) $headdata .= "--------------------------------------------------------\n";
|
|
||||||
}
|
}
|
||||||
if ($mailcontent['message'])
|
if ($mailcontent['message'])
|
||||||
{
|
{
|
||||||
@ -1650,6 +1645,30 @@ class infolog_ui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function createHeaderInfoSection($header)
|
||||||
|
{
|
||||||
|
$headdata = null;
|
||||||
|
if ($header['SUBJECT']) $headdata = lang('subject').': '.$header['SUBJECT']."\n";
|
||||||
|
if ($header['FROM']) $headdata .= lang('from').': '.$header['FROM']."\n";
|
||||||
|
if ($header['SENDER']) $headdata .= lang('sender').': '.$header['SENDER']."\n";
|
||||||
|
if ($header['TO']) $headdata .= lang('to').': '.$header['TO']."\n";
|
||||||
|
if ($header['CC']) $headdata .= lang('cc').': '.$header['CC']."\n";
|
||||||
|
if ($header['DATE']) $headdata .= lang('date').': '.$header['DATE']."\n";
|
||||||
|
if ($header['PRIORITY'] && $header['PRIORITY'] != 'normal') $headdata .= lang('priority').': '.$header['PRIORITY']."\n";
|
||||||
|
if ($header['IMPORTANCE'] && $header['IMPORTANCE'] !='normal') $headdata .= lang('importance').': '.$header['IMPORTANCE']."\n";
|
||||||
|
//if ($mailcontent['headers']['ORGANIZATION']) $headdata .= lang('organization').': '.$mailcontent['headers']['ORGANIZATION']."\
|
||||||
|
if (!empty($headdata))
|
||||||
|
{
|
||||||
|
$headdata = "--------------------------------------------------------\n".$headdata;
|
||||||
|
$headdata .= "--------------------------------------------------------\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$headdata = "--------------------------------------------------------\n";
|
||||||
|
}
|
||||||
|
return $headdata;
|
||||||
|
}
|
||||||
|
|
||||||
static function &getdisplayableBody(&$bofelamimail, $bodyParts)
|
static function &getdisplayableBody(&$bofelamimail, $bodyParts)
|
||||||
{
|
{
|
||||||
for($i=0; $i<count($bodyParts); $i++)
|
for($i=0; $i<count($bodyParts); $i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user