From 1b9c1051986cbf1971ff0c129d9a9aae8e1a344a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 7 Jun 2013 11:53:45 +0000 Subject: [PATCH] * Calendar: changing an existing, recurring event to whole-day, caused an end-time on day before start --- calendar/inc/class.calendar_bo.inc.php | 5 ++--- calendar/inc/class.calendar_boupdate.inc.php | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index ea6c5c2b8b..10520fd8b1 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -750,7 +750,7 @@ class calendar_bo if ($event['whole_day']) { $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); $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') { - $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; @@ -972,7 +972,6 @@ class calendar_bo } $ts_end = $ts + $event_length; - // adjust ts_end for whole day events in case it does not fit due to // spans over summer/wintertime adjusted days if($event['whole_day'] && ($arr_end = $this->date2array($ts_end)) && diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 3ddf7ff710..cc49a744a6 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1065,27 +1065,27 @@ class calendar_boupdate extends calendar_bo if (!empty($event['start'])) { $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'); $save_event['start'] = $time; } if (!empty($event['end'])) { $time = new egw_time($event['end'], egw_time::$user_timezone); - $time =& $this->so->startOfDay($time); $time->setTime(23, 59, 59); $event['end'] = egw_time::to($time, 'ts'); + $save_event['end'] = $time; } if (!empty($event['recurrence'])) { $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'); } if (!empty($event['recur_enddate'])) { $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'); $time->setUser(); $save_event['recur_enddate'] = egw_time::to($time, 'ts');