From bc42bdef49b688d954b776cf4f4d7b1d74da53d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Thu, 11 May 2023 09:25:07 +0200 Subject: [PATCH 1/4] FIX: wrong colspan for tasks list --- htdocs/projet/tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 64d134a7254..53ad98eb194 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -773,7 +773,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; // Other options - $parameters = array(); + $parameters = array('arrayfields' => &$arrayfields); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -1046,7 +1046,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third $j = 0; $level = 0; $nboftaskshown = projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $object->id, 1, $object->id, $filterprogresscalc, ($object->usage_bill_time ? 1 : 0), $arrayfields); } else { - $colspan = 10; + $colspan = count($arrayfields); if ($object->usage_bill_time) { $colspan += 2; } From 4ad585facc76bc62ff2f3c841bb4bd3b914275e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Thu, 11 May 2023 11:41:58 +0200 Subject: [PATCH 2/4] FIX: Add Missing rights check on holiday calendar --- htdocs/comm/action/index.php | 132 +++++++++++++++++++---------------- 1 file changed, 71 insertions(+), 61 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 9b451a47659..4878ecaa13c 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -582,10 +582,18 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on // Local calendar $s .= '
'.$langs->trans("LocalAgenda").'  
'; - // Holiday calendar - $s .= '
 
'; + if ($user->rights->holiday->read) { + // Holiday calendar + $s .= ' +
+   +
'; + } - // External calendars + // External calendars if (is_array($showextcals) && count($showextcals) > 0) { $s .= '