mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 18:08:02 +02:00
Calendar: Event from mail now defaults to start of next hour to match other places, instead of time the email was sent
This commit is contained in:
parent
631be5769d
commit
515bad6d3b
@ -3375,7 +3375,8 @@ class calendar_uiforms extends calendar_ui
|
|||||||
));
|
));
|
||||||
|
|
||||||
// Prepare calendar event draft
|
// Prepare calendar event draft
|
||||||
$event = array(
|
$event = $this->default_add_event();
|
||||||
|
$event = array_merge($event, array(
|
||||||
'title' => $mailContent['subject'],
|
'title' => $mailContent['subject'],
|
||||||
'description' => $mailContent['message'],
|
'description' => $mailContent['message'],
|
||||||
'participants' => $participants,
|
'participants' => $participants,
|
||||||
@ -3383,10 +3384,16 @@ class calendar_uiforms extends calendar_ui
|
|||||||
'to_app' => 'calendar',
|
'to_app' => 'calendar',
|
||||||
'to_id' => 0,
|
'to_id' => 0,
|
||||||
),
|
),
|
||||||
'start' => $mailContent['date'],
|
|
||||||
'duration' => 60 * $this->cal_prefs['interval'],
|
'duration' => 60 * $this->cal_prefs['interval'],
|
||||||
'owner' => $GLOBALS['egw_info']['user']['account_id']
|
'owner' => $GLOBALS['egw_info']['user']['account_id']
|
||||||
);
|
));
|
||||||
|
$ts = new Api\DateTime();
|
||||||
|
$ts->setUser();
|
||||||
|
if($mailContent['date'] >= $ts->format('ts'))
|
||||||
|
{
|
||||||
|
// Mail from the future! Ok, use that date
|
||||||
|
$event['start'] = $mailContent['date'];
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($mailContent['attachments']))
|
if (is_array($mailContent['attachments']))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user