From e9d92531478c998448feca24c56510327b4c17eb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Mar 2023 12:36:43 +0200 Subject: [PATCH 1/2] fix : Warning: Undefined array key align in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/class/commondocgenerator.class.php on line 1575 --- htdocs/core/class/commondocgenerator.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 1b59d44bdde..2278a1de8dc 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1567,17 +1567,21 @@ abstract class CommonDocGenerator // set cell padding with column title definition $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], $colDef['title']['padding'][2]); } - + if (isset($colDef['title']['align'])) { + $align = $colDef['title']['align']; + } else { + $align = ''; + } $pdf->SetXY($colDef['xStartPos'], $tab_top); $textWidth = $colDef['width']; - $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); + $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $align); // Add variant of translation if $outputlangsbis is an object if (is_object($outputlangsbis) && trim($colDef['title']['label'])) { $pdf->setCellPaddings($colDef['title']['padding'][3], 0, $colDef['title']['padding'][1], $colDef['title']['padding'][2]); $pdf->SetXY($colDef['xStartPos'], $pdf->GetY()); $textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']); - $pdf->MultiCell($textWidth, 2, $textbis, '', $colDef['title']['align']); + $pdf->MultiCell($textWidth, 2, $textbis, '', $align); } $this->tabTitleHeight = max($pdf->GetY() - $tab_top, $this->tabTitleHeight); From 96d23fac5f9fa8fa307e8c8cc50af3115a9257fa Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:57:03 +0200 Subject: [PATCH 2/2] FIX: project referent elements list: conf to hide tasks was flipped --- htdocs/projet/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 935275bfe54..1bdefbcc1e6 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -580,7 +580,7 @@ $listofreferent = array( 'urlnew'=>DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&action=createtime&projectid='.$id.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$id), 'buttonnew'=>'AddTimeSpent', 'testnew'=>$user->hasRight('project', 'creer'), - 'test'=>!empty($conf->project->enabled) && $user->hasRight('projet', 'lire') && !empty($conf->global->PROJECT_HIDE_TASKS)), + 'test'=>!empty($conf->project->enabled) && $user->hasRight('projet', 'lire') && empty($conf->global->PROJECT_HIDE_TASKS)), 'stock_mouvement'=>array( 'name'=>"MouvementStockAssociated", 'title'=>"ListMouvementStockProject",