From 77f213832ec9fbc1ec2925066739355b9e85fe27 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 11 Jan 2021 19:40:44 +0100 Subject: [PATCH 1/2] fix: update group name --- htdocs/user/class/usergroup.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 4d858ffbaf9..2c29db85fc7 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -675,6 +675,10 @@ class UserGroup extends CommonObject { global $user, $conf; + if (empty($this->nom) && !empty($this->name)) { + $this->nom = $this->name; + } + $entity = $conf->entity; if (!empty($conf->multicompany->enabled) && $conf->entity == 1) { From 34b792e9a22738a6210cfd98a89ff7c61e9e23b5 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 12 Jan 2021 21:44:18 +0100 Subject: [PATCH 2/2] betterfix --- htdocs/core/tpl/extrafields_list_search_sql.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 316899ee472..296dfec52a0 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -37,7 +37,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($ { $mode_search = 0; if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search = 1; // Search on a numeric - if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1' && !is_string($crit)) $mode_search = 2; // Search on a foreign key int + if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1' && is_numeric($crit)) $mode_search = 2; // Search on a foreign key int if (in_array($typ, array('sellist')) && is_string($crit)) $mode_search = 0;// Search on a foreign key string if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search = 4; // Search on a multiselect field with sql type = text if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string