mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
Use recurrence date to set title / date to a particular recurrence instead of the first one
This commit is contained in:
parent
c1b44e29d0
commit
29b315d686
@ -294,7 +294,6 @@ class timesheet_ui extends timesheet_bo
|
|||||||
$link_id = $link_ids[$n];
|
$link_id = $link_ids[$n];
|
||||||
if (preg_match('/^[a-z_0-9-]+:[:a-z_0-9-]+$/i',$link_app.':'.$link_id)) // gard against XSS
|
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)
|
switch ($link_app)
|
||||||
{
|
{
|
||||||
case 'projectmanager':
|
case 'projectmanager':
|
||||||
@ -306,19 +305,20 @@ class timesheet_ui extends timesheet_bo
|
|||||||
break;
|
break;
|
||||||
case 'calendar':
|
case 'calendar':
|
||||||
$calendar_bo = new calendar_bo();
|
$calendar_bo = new calendar_bo();
|
||||||
$event = $calendar_bo->read($link_id);
|
list($link_id, $recurrence) = explode(':', $link_id);
|
||||||
if(!$event['recur_type'])
|
$event = $calendar_bo->read($link_id, $recurrence);
|
||||||
{
|
$content['ts_start'] = $event['start'];
|
||||||
$content['ts_start'] = $event['start'];
|
$content['ts_title'] = $calendar_bo->link_title($event);
|
||||||
}
|
|
||||||
$content['ts_description'] = $event['description'];
|
$content['ts_description'] = $event['description'];
|
||||||
$content['ts_duration'] = ($event['end'] - $event['start']) / 60;
|
$content['ts_duration'] = ($event['end'] - $event['start']) / 60;
|
||||||
$content['ts_quantity'] = ($event['end'] - $event['start']) / 3600;
|
$content['ts_quantity'] = ($event['end'] - $event['start']) / 3600;
|
||||||
unset($content['end_time']);
|
unset($content['end_time']);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$preserv['ts_title_blur'] = egw_link::title($link_app,$link_id);
|
$preserv['ts_title_blur'] = egw_link::title($link_app,$link_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user