mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 10:23:28 +01:00
* Calendar/eSync/CalDAV: meeting requests contain again nice body followed by a separator and describtion, ignore empty description in eSync ChangeMessage
This commit is contained in:
parent
2cfb562f65
commit
a15fc1457b
@ -635,8 +635,12 @@ return array(); // temporary disabling meeting requests from calendar
|
||||
if (isset($message->$attr)) $event[$key] = $message->$attr;
|
||||
}
|
||||
|
||||
$event['description'] = $this->backend->messagenote2note($message->body, $message->rtf, $message->airsyncbasebody);
|
||||
|
||||
// only change description, if one given, as iOS5 skips description in ChangeMessage after MeetingResponse
|
||||
// --> we ignore empty / not set description, so description get no longer lost, but you cant empty it via eSync
|
||||
if (($description = $this->backend->messagenote2note($message->body, $message->rtf, $message->airsyncbasebody)))
|
||||
{
|
||||
$event['description'] = $description;
|
||||
}
|
||||
$event['public'] = (int)($message->sensitivity < 1); // 0=normal, 1=personal, 2=private, 3=confidential
|
||||
|
||||
// busystatus=(0=free|1=tentative|2=busy|3=out-of-office), EGw has non_blocking=0|1
|
||||
|
@ -865,22 +865,20 @@ class calendar_boupdate extends calendar_bo
|
||||
'encoding' => '8bit',
|
||||
'type' => 'text/calendar; method='.$method,
|
||||
);
|
||||
$popup = $body;
|
||||
$popupsubject = $subject;
|
||||
// format iCal uses now like Exchange event-title as subject and description as body
|
||||
$subject = $event['title'];
|
||||
$body = $event['description'];
|
||||
// fall through
|
||||
case 'extended':
|
||||
$popup .= "\n\n".lang('Event Details follow').":\n";
|
||||
$body .= "\n\n".lang('Event Details follow').":\n";
|
||||
foreach($event_arr as $key => $val)
|
||||
{
|
||||
if(!empty($details[$key]))
|
||||
{
|
||||
switch($key){
|
||||
switch($key)
|
||||
{
|
||||
case 'access':
|
||||
case 'priority':
|
||||
case 'link':
|
||||
case 'description':
|
||||
break;
|
||||
default:
|
||||
$popup .= sprintf("%-20s %s\n",$val['field'].':',$details[$key]);
|
||||
@ -888,11 +886,8 @@ class calendar_boupdate extends calendar_bo
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($part_prefs['calendar']['update_format']=='extended')
|
||||
{
|
||||
$body = $body.$popup;
|
||||
unset($popup);
|
||||
}
|
||||
// description need to be separated from body by fancy separator
|
||||
$body .= "\n*~*~*~*~*~*~*~*~*~*\n\n".$details['description'];
|
||||
break;
|
||||
}
|
||||
// send via notification_app
|
||||
@ -903,10 +898,8 @@ class calendar_boupdate extends calendar_bo
|
||||
$notification = new notifications();
|
||||
$notification->set_receivers(array($userid));
|
||||
$notification->set_message($body);
|
||||
if (isset($popup)&&!empty($popup)) $notification->set_popupmessage($popup);
|
||||
$notification->set_sender($senderid);
|
||||
$notification->set_subject($subject);
|
||||
if (isset($popupsubject)&&!empty($popupsubject)) $notification->set_popupsubject($popupsubject);
|
||||
// as we want ical body to be just describtion, we can NOT set links, as they get appended to body
|
||||
if ($part_prefs['calendar']['update_format'] != 'ical')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user