From 9013a52b8115f956b1331d06addb76d782fd1028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Mon, 3 May 2010 07:52:10 +0000 Subject: [PATCH] Fix Edit recurring event issues again :-( --- calendar/inc/class.calendar_uiforms.inc.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index ff7a25a70b..b5ecbbf4f7 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -837,25 +837,22 @@ class calendar_uiforms extends calendar_ui } else { - if (!empty($event['whole_day']) && $event['recur_type'] != MCAL_RECUR_NONE && $_GET['exception']) - { - $date = new egw_time((int)$_GET['date'], egw_time::$user_timezone); - $date =& $this->bo->so->startOfDay($date); - $date->setUser(); - $event = $this->bo->read($cal_id, $date); - } $preserv['actual_date'] = $event['start']; // remember the date clicked - if ($event['recur_type'] != MCAL_RECUR_NONE) + if ($event['recur_type'] != MCAL_RECUR_NONE && $_GET['exception']) { - // check if we should create an exception - if ($_GET['exception']) + if (empty($event['whole_day'])) { - $msg = $this->_create_exception($event,$preserv); + $date = $_GET['date']; } else { - $event = $this->bo->read($cal_id,0,true); + $date = new egw_time($_GET['date'], egw_time::$user_timezone); + $date =& $this->bo->so->startOfDay($date); + $date->setUser(); } + $event = $this->bo->read($cal_id, $date, true); + $preserv['actual_date'] = $event['start']; // remember the date clicked + $msg = $this->_create_exception($event,$preserv); } } // set new start and end if given by $_GET