Fix regression

This commit is contained in:
Laurent Destailleur 2022-07-29 11:48:17 +02:00
parent a4b7f38346
commit 79e0d59978

View File

@ -567,19 +567,22 @@ $form = new Form($db);
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
$objsoc = new Societe($db);
if ($socid > 0) {
$objsoc->fetch($socid);
}
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) {
$title = $object->lastname;
}
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
llxHeader('', $title, $help_url);
$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
$objsoc = new Societe($db);
if ($socid > 0) {
$objsoc->fetch($socid);
}
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// -----------------------------------------
// When used with CANVAS
@ -621,8 +624,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Show tabs
$head = contact_prepare_head($object);
llxHeader('', $title, $help_url);
}
if ($user->rights->societe->contact->creer) {
@ -643,9 +644,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
$linkback = '';
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
llxHeader('', $title, $help_url);
print load_fiche_titre($title, $linkback, 'address');