mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +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;
|
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
|
$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
|
// 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',
|
'encoding' => '8bit',
|
||||||
'type' => 'text/calendar; method='.$method,
|
'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'];
|
$subject = $event['title'];
|
||||||
$body = $event['description'];
|
|
||||||
// fall through
|
// fall through
|
||||||
case 'extended':
|
case 'extended':
|
||||||
$popup .= "\n\n".lang('Event Details follow').":\n";
|
$body .= "\n\n".lang('Event Details follow').":\n";
|
||||||
foreach($event_arr as $key => $val)
|
foreach($event_arr as $key => $val)
|
||||||
{
|
{
|
||||||
if(!empty($details[$key]))
|
if(!empty($details[$key]))
|
||||||
{
|
{
|
||||||
switch($key){
|
switch($key)
|
||||||
|
{
|
||||||
case 'access':
|
case 'access':
|
||||||
case 'priority':
|
case 'priority':
|
||||||
case 'link':
|
case 'link':
|
||||||
|
case 'description':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$popup .= sprintf("%-20s %s\n",$val['field'].':',$details[$key]);
|
$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')
|
// description need to be separated from body by fancy separator
|
||||||
{
|
$body .= "\n*~*~*~*~*~*~*~*~*~*\n\n".$details['description'];
|
||||||
$body = $body.$popup;
|
|
||||||
unset($popup);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// send via notification_app
|
// send via notification_app
|
||||||
@ -903,10 +898,8 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$notification = new notifications();
|
$notification = new notifications();
|
||||||
$notification->set_receivers(array($userid));
|
$notification->set_receivers(array($userid));
|
||||||
$notification->set_message($body);
|
$notification->set_message($body);
|
||||||
if (isset($popup)&&!empty($popup)) $notification->set_popupmessage($popup);
|
|
||||||
$notification->set_sender($senderid);
|
$notification->set_sender($senderid);
|
||||||
$notification->set_subject($subject);
|
$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
|
// 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')
|
if ($part_prefs['calendar']['update_format'] != 'ical')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user