From 6a93275d93437fe96183318c20b21179394b4939 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 4 Nov 2022 15:57:23 +0100 Subject: [PATCH] only consider last linked entry, for timers created on an app entry as rest of code wont deal with multiple ones --- timesheet/inc/class.timesheet_ui.inc.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index f32d0deff6..b8f9a2b82c 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -112,19 +112,8 @@ class timesheet_ui extends timesheet_bo { if (!empty($event['tse_app']) && $event['tse_app'] !== TIMESHEET_APP && !empty($event['tse_app_id'])) { - if (!isset($_REQUEST['link_app'])) - { - $_REQUEST['link_app'] = $event['tse_app']; - $_REQUEST['link_id'] = $event['tse_app_id']; - } - else - { - if (!isset($this->data['link_to']['to_id'])) - { - $this->data['link_to']['to_id'] = $this->data['ts_id'] ?? []; - } - Api\Link::link(TIMESHEET_APP, $this->data['link_to']['to_id'], $event['tse_app'], $event['tse_app_id']); - } + $_REQUEST['link_app'] = $event['tse_app']; + $_REQUEST['link_id'] = $event['tse_app_id']; } } }