mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-13 15:08:33 +01:00
try to handle text/calendar attachments that are NO ical-file
This commit is contained in:
parent
1f3c674ef6
commit
352640e2b2
@ -2762,6 +2762,10 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
|||||||
if (strtolower($attach['mimeType']) == 'text/calendar' &&
|
if (strtolower($attach['mimeType']) == 'text/calendar' &&
|
||||||
isset($GLOBALS['egw_info']['user']['apps']['calendar']) &&
|
isset($GLOBALS['egw_info']['user']['apps']['calendar']) &&
|
||||||
($attachment = $this->mail_bo->getAttachment($uid, $attach['partID'],0,(strtolower($attach['mimeType']) == 'text/calendar'?false:true))))
|
($attachment = $this->mail_bo->getAttachment($uid, $attach['partID'],0,(strtolower($attach['mimeType']) == 'text/calendar'?false:true))))
|
||||||
|
{
|
||||||
|
$ical = new calendar_ical();
|
||||||
|
$ical_charset = $attach['charset'] ? $attach['charset'] : 'utf-8';
|
||||||
|
if (($events = $ical->icaltoegw($attachment['attachment'], '', $ical_charset)))
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.__LINE__.array2string($attachment));
|
//error_log(__METHOD__.__LINE__.array2string($attachment));
|
||||||
egw_cache::setSession('calendar', 'ical', array(
|
egw_cache::setSession('calendar', 'ical', array(
|
||||||
@ -2776,6 +2780,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
|||||||
array('event'=>null,'msg'=>'','useSession'=>true)
|
array('event'=>null,'msg'=>'','useSession'=>true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$bodyParts[] = array('body'=>$attachment['attachment'], 'charSet'=>$attach['charset'] ? $attach['charset'] : 'utf-8');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Compose the content of the frame
|
// Compose the content of the frame
|
||||||
$frameHtml =
|
$frameHtml =
|
||||||
|
Loading…
Reference in New Issue
Block a user