From 7a4b0e38cdd8d7050ca6cbee4d51a743d42bb4f9 Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Wed, 5 Jan 2022 14:35:11 +0100 Subject: [PATCH 1/2] NEW : Contact filter project list --- htdocs/core/class/html.form.class.php | 17 +++++++++++------ htdocs/langs/en_US/projects.lang | 1 + htdocs/langs/fr_FR/projects.lang | 1 + htdocs/projet/list.php | 26 +++++++++++++++++++++++--- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 89c45d4236b..dfd22cd644f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1690,12 +1690,17 @@ class Form $out .= ''; } - if($showempty && !is_numeric($showempty)) { - $textforempty = $showempty; - $out .= ''; - } else { - if(($showempty == 1 || ($showempty == 3 && $num > 1)) && ! $multiple) { - $out .= ''; - } - if($showempty == 2) { - $out .= ''; - } - } + if ($showempty && ! is_numeric($showempty)) { + $textforempty = $showempty; + $out .= ''; + } + else { + if (($showempty == 1 || ($showempty == 3 && $num > 1)) && ! $multiple) { + $out .= ''; + } + if ($showempty == 2) { + $out .= ''; + } + } $i = 0; if ($num) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 2f99fd99b4a..bd7442b1827 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -371,7 +371,7 @@ $sql .= " WHERE ctc.element = '".$db->escape($object->element)."'"; $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { - if($obj->source == 'internal') $listofprojectcontacttype[$obj->rowid] = $obj->code; + if ($obj->source == 'internal') $listofprojectcontacttype[$obj->rowid] = $obj->code; else $listofprojectcontacttypeexternal[$obj->rowid] = $obj->code; } } else {