diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index fa1b5405127..d63da5ea882 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -56,9 +56,9 @@ print $langs->trans("SetupDescription2")."

"; print '
'; //print '
'; print img_picto('','puce').' '.$langs->trans("SetupDescription3",DOL_URL_ROOT.'/admin/company.php?mainmenu=home'); -if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_PAYS)) -{ - $langs->load("errors"); +if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_PAYS)) +{ + $langs->load("errors"); $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").''; } diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 5680cfb676c..1f22f42eb4e 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -776,8 +776,8 @@ if ($id > 0) { if ($user->rights->facture->creer) { - $langs->load("bills"); - $langs->load("orders"); + $langs->load("bills"); + $langs->load("orders"); if (! empty($conf->commande->enabled)) { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 56a4e4cc754..0f9d67113fd 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1591,9 +1591,6 @@ print '
'; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; - $formcompany= new FormCompany($db); - $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2d348b131e8..641fcbce1ae 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1260,9 +1260,9 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G } } - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) { - if ($action == 'addcontact' && $user->rights->commande->creer) + if ($action == 'addcontact') { if ($object->id > 0) { @@ -1290,7 +1290,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G } // bascule du statut d'un contact - else if ($action == 'swapstatut' && $user->rights->commande->creer) + else if ($action == 'swapstatut') { if ($object->id > 0) { @@ -1303,7 +1303,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G } // Efface un contact - else if ($action == 'deletecontact' && $user->rights->commande->creer) + else if ($action == 'deletecontact') { $result = $object->delete_contact($lineid); @@ -2101,9 +2101,6 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; - $formcompany= new FormCompany($db); - $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 47ccaa16292..1d230ad7406 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1629,9 +1629,9 @@ else if ($action == 'remove_file') } } -if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) +if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture->creer) { - if ($action == 'addcontact' && $user->rights->facture->creer) + if ($action == 'addcontact') { $result = $object->fetch($id); @@ -1661,7 +1661,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) } // bascule du statut d'un contact - else if ($action == 'swapstatut' && $user->rights->facture->creer) + else if ($action == 'swapstatut') { if ($object->fetch($id)) { @@ -1674,7 +1674,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) } // Efface un contact - else if ($action == 'deletecontact' && $user->rights->facture->creer) + else if ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($lineid); @@ -2980,10 +2980,6 @@ else if ($id > 0 || ! empty($ref)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; - $formcompany= new FormCompany($db); - $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 40bf8d84396..ca6b2eadae1 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -486,9 +486,9 @@ else if ($action == 'setnote' && $user->rights->contrat->creer) if ($result < 0) dol_print_error($db,$object->error); } -if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) +if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) { - if ($action == 'addcontact' && $user->rights->contrat->creer) + if ($action == 'addcontact') { $result = $object->fetch($id); @@ -518,7 +518,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) } // bascule du statut d'un contact - else if ($action == 'swapstatut' && $user->rights->contrat->creer) + else if ($action == 'swapstatut') { if ($object->fetch($id)) { @@ -531,7 +531,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) } // Efface un contact - else if ($action == 'deletecontact' && $user->rights->contrat->creer) + else if ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact(GETPOST('lineid')); @@ -627,9 +627,9 @@ if ($action == 'create') print ''.$langs->trans("NotePublic").''; - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor('note_public', GETPOST('note_public'), '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70); - print $doleditor->Create(1); + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor('note_public', GETPOST('note_public'), '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70); + print $doleditor->Create(1); /* print '