Skip to content

Commit

Permalink
FIX: Bug on select user on time.php (all project list)
Browse files Browse the repository at this point in the history
In the context of time.php, if we list all projects, $id (of the task) is not defined (because it is used when we are in the One task context).
  • Loading branch information
Quentin-Seekness authored Dec 31, 2024
1 parent f91aadf commit 06a0769
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdocs/projet/tasks/time.php
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,8 @@ function setDetailVisibility() {
print '<td class="nowraponall">';
if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
if (empty($object->id)) {
$object->fetch($id);
$idTask = (!empty($id)) ? $id : $task_time->fk_element;
$object->fetch($idTask);
}
$contactsoftask = $object->getListContactId('internal');
if (!in_array($task_time->fk_user, $contactsoftask)) {
Expand Down Expand Up @@ -2743,7 +2744,8 @@ function setDetailVisibility() {
print '<td class="nowraponall tdoverflowmax100">';
if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
if (empty($object->id)) {
$object->fetch($id);
$idTask = (!empty($id)) ? $id : $task_time->fk_element;
$object->fetch($idTask);
}
$contactsoftask = $object->getListContactId('internal');
if (!in_array($task_time->fk_user, $contactsoftask)) {
Expand Down

0 comments on commit 06a0769

Please sign in to comment.