FIX : alias name in contact list

This commit is contained in:
atm-lena 2023-01-11 09:35:28 +01:00
parent d1e7e527ba
commit f6cde9507e

View File

@ -357,6 +357,9 @@ if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)
$contactstatic->loadCacheOfProspStatus();
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
// Select every potentiels, and note each potentiels which fit in search parameters
$tab_level = array();
$sql = "SELECT code, label, sortorder";
@ -692,9 +695,6 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && (
exit;
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas';
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
@ -1377,7 +1377,7 @@ while ($i < min($num, $limit)) {
if ($obj->socid) {
$objsoc = new Societe($db);
$objsoc->fetch($obj->socid);
print $objsoc->getNomUrl(1);
print $objsoc->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
} else {
print '&nbsp;';
}