From 29b315d686b8e5a8cf3d2a50a5d6aca3080c2c73 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 30 Apr 2010 15:41:45 +0000 Subject: [PATCH] Use recurrence date to set title / date to a particular recurrence instead of the first one --- timesheet/inc/class.timesheet_ui.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index a4842f06be..7a2548a280 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -294,7 +294,6 @@ class timesheet_ui extends timesheet_bo $link_id = $link_ids[$n]; if (preg_match('/^[a-z_0-9-]+:[:a-z_0-9-]+$/i',$link_app.':'.$link_id)) // gard against XSS { - egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id); switch ($link_app) { case 'projectmanager': @@ -306,19 +305,20 @@ class timesheet_ui extends timesheet_bo break; case 'calendar': $calendar_bo = new calendar_bo(); - $event = $calendar_bo->read($link_id); - if(!$event['recur_type']) - { - $content['ts_start'] = $event['start']; - } + list($link_id, $recurrence) = explode(':', $link_id); + $event = $calendar_bo->read($link_id, $recurrence); + $content['ts_start'] = $event['start']; + $content['ts_title'] = $calendar_bo->link_title($event); $content['ts_description'] = $event['description']; $content['ts_duration'] = ($event['end'] - $event['start']) / 60; $content['ts_quantity'] = ($event['end'] - $event['start']) / 3600; unset($content['end_time']); + break; default: $preserv['ts_title_blur'] = egw_link::title($link_app,$link_id); break; } + egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id); } } }