diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index af9a15e05d..56b327e7f3 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -4209,9 +4209,11 @@ return; { $GLOBALS['phpgw']->uiaccountsel = CreateObject('phpgwapi.uiaccountsel'); } - $fts_link = $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'calendar.uiforms.freetimesearch')); + $get_args = array('menuaction'=>'calendar.uiforms.freetimesearch'); + if ($event['id']) $get_args['cal_id'] = $event['id']; + $fts_link = $GLOBALS['phpgw']->link('/index.php',$get_args); - $fields = array('start[str]','start[hour]','start[min]','end[str]','end[hour]','end[min]','cal[id]','cal[recur_type]'); + $fields = array('start[str]','start[hour]','start[min]','end[str]','end[hour]','end[min]','cal[recur_type]'); if ($this->bo->prefs['common']['timeformat'] == '12') { $fields[] = 'start[ampm]'; diff --git a/calendar/inc/class.uiforms.inc.php b/calendar/inc/class.uiforms.inc.php index 00b6a2517c..2c8d36920b 100644 --- a/calendar/inc/class.uiforms.inc.php +++ b/calendar/inc/class.uiforms.inc.php @@ -76,7 +76,7 @@ class uiforms extends uical { if ((int) $uid) $content['participants'][] = (int) $uid; } - $content['cal_id'] = $_GET['cal']['id']; + $content['cal_id'] = $_GET['cal_id']; $content['recur_type'] = $_GET['cal']['recur_type']; // default search parameters @@ -96,7 +96,7 @@ class uiforms extends uical if (is_array($content['freetime']['select'])) { list($selected) = each($content['freetime']['select']); - echo "$selected = ".date('D d.m.Y H:i',$content['freetime'][$selected]['start']); + //echo "$selected = ".date('D d.m.Y H:i',$content['freetime'][$selected]['start']); $start = (int) $content['freetime'][$selected]['start']; $end = $start + $duration; $fields_to_set = array(