diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index d6c4c0a6313..e23d2ce01a9 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -190,12 +190,10 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST { $tmparray[] = dol_string_nospecial($contact->getFullName($langs), ' ', array(",")).' <'.$contact->email.'>'; } - elseif ((int) $val > 0) // $val is the Id of a contact + elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = $val; - } else { - $tmparray[] = $val; } } } @@ -242,12 +240,10 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST { $tmparray[] = dol_string_nospecial($contact->name, ' ', array(",")).' <'.$contact->email.'>'; } - elseif ((int) $val > 0) // $val is the Id of a contact + elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = $val; TODO Add also id of contact in CC ? - } else { - $tmparray[] = $val; } } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6d1ce33b0be..bc89fb3403d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6621,11 +6621,10 @@ class Form * @param string $elemtype Type of element we show ('category', ...). Will execute a formating function on it. To use in readonly mode if js component support HTML formatting. * @param string $placeholder String to use as placeholder * @param int $addjscombo Add js combo - * @param int $enablefreetag 0 no free tag, 1 enable free tag for elemtype * @return string HTML multiselect string * @see selectarray(), selectArrayAjax(), selectArrayFilter() */ - public static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1, $enablefreetag = 0) + public static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1) { global $conf, $langs; @@ -6639,11 +6638,11 @@ class Form // Add code for jquery to use multiselect if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { + $out .= "\n".' +