mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
* Calendar: changing an existing, recurring event to whole-day, caused an end-time on day before start
This commit is contained in:
parent
0a22f09523
commit
1b9c105198
@ -750,7 +750,7 @@ class calendar_bo
|
|||||||
if ($event['whole_day'])
|
if ($event['whole_day'])
|
||||||
{
|
{
|
||||||
$time = new egw_time($event['end'], egw_time::$user_timezone);
|
$time = new egw_time($event['end'], egw_time::$user_timezone);
|
||||||
$time =& $this->so->startOfDay($time);
|
$time = $this->so->startOfDay($time);
|
||||||
$time->setTime(23, 59, 59);
|
$time->setTime(23, 59, 59);
|
||||||
$end = $this->date2ts($time,true);
|
$end = $this->date2ts($time,true);
|
||||||
}
|
}
|
||||||
@ -945,7 +945,7 @@ class calendar_bo
|
|||||||
{
|
{
|
||||||
if ((int) $this->debug >= 3 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont' || $this->debug == 'insert_all_recurrences')
|
if ((int) $this->debug >= 3 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont' || $this->debug == 'insert_all_recurrences')
|
||||||
{
|
{
|
||||||
$this->debug_message(__METHOD__.'(%1,%2,%3,&$event)',true,$event,$start,$end);
|
$this->debug_message(__METHOD__.'(%1,%2,%3,&$events)',true,$event,$start,$end);
|
||||||
}
|
}
|
||||||
$start_in = $start; $end_in = $end;
|
$start_in = $start; $end_in = $end;
|
||||||
|
|
||||||
@ -972,7 +972,6 @@ class calendar_bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ts_end = $ts + $event_length;
|
$ts_end = $ts + $event_length;
|
||||||
|
|
||||||
// adjust ts_end for whole day events in case it does not fit due to
|
// adjust ts_end for whole day events in case it does not fit due to
|
||||||
// spans over summer/wintertime adjusted days
|
// spans over summer/wintertime adjusted days
|
||||||
if($event['whole_day'] && ($arr_end = $this->date2array($ts_end)) &&
|
if($event['whole_day'] && ($arr_end = $this->date2array($ts_end)) &&
|
||||||
|
@ -1065,27 +1065,27 @@ class calendar_boupdate extends calendar_bo
|
|||||||
if (!empty($event['start']))
|
if (!empty($event['start']))
|
||||||
{
|
{
|
||||||
$time = new egw_time($event['start'], egw_time::$user_timezone);
|
$time = new egw_time($event['start'], egw_time::$user_timezone);
|
||||||
$time =& $this->so->startOfDay($time);
|
$time = $this->so->startOfDay($time);
|
||||||
$event['start'] = egw_time::to($time, 'ts');
|
$event['start'] = egw_time::to($time, 'ts');
|
||||||
$save_event['start'] = $time;
|
$save_event['start'] = $time;
|
||||||
}
|
}
|
||||||
if (!empty($event['end']))
|
if (!empty($event['end']))
|
||||||
{
|
{
|
||||||
$time = new egw_time($event['end'], egw_time::$user_timezone);
|
$time = new egw_time($event['end'], egw_time::$user_timezone);
|
||||||
$time =& $this->so->startOfDay($time);
|
|
||||||
$time->setTime(23, 59, 59);
|
$time->setTime(23, 59, 59);
|
||||||
$event['end'] = egw_time::to($time, 'ts');
|
$event['end'] = egw_time::to($time, 'ts');
|
||||||
|
$save_event['end'] = $time;
|
||||||
}
|
}
|
||||||
if (!empty($event['recurrence']))
|
if (!empty($event['recurrence']))
|
||||||
{
|
{
|
||||||
$time = new egw_time($event['recurrence'], egw_time::$user_timezone);
|
$time = new egw_time($event['recurrence'], egw_time::$user_timezone);
|
||||||
$time =& $this->so->startOfDay($time);
|
$time = $this->so->startOfDay($time);
|
||||||
$event['recurrence'] = egw_time::to($time, 'ts');
|
$event['recurrence'] = egw_time::to($time, 'ts');
|
||||||
}
|
}
|
||||||
if (!empty($event['recur_enddate']))
|
if (!empty($event['recur_enddate']))
|
||||||
{
|
{
|
||||||
$time = new egw_time($event['recur_enddate'], egw_time::$user_timezone);
|
$time = new egw_time($event['recur_enddate'], egw_time::$user_timezone);
|
||||||
$time =& $this->so->startOfDay($time);
|
$time = $this->so->startOfDay($time);
|
||||||
$event['recur_enddate'] = egw_time::to($time, 'ts');
|
$event['recur_enddate'] = egw_time::to($time, 'ts');
|
||||||
$time->setUser();
|
$time->setUser();
|
||||||
$save_event['recur_enddate'] = egw_time::to($time, 'ts');
|
$save_event['recur_enddate'] = egw_time::to($time, 'ts');
|
||||||
|
Loading…
Reference in New Issue
Block a user