From 12885deb468598be223c441e3b14d4af4d5ec4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Wed, 11 Jan 2023 21:19:33 +0100 Subject: [PATCH] correction bug selection contact dans emailing --- htdocs/core/modules/mailings/contacts1.modules.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 7406779054b..be77cf155d2 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -122,7 +122,7 @@ class mailing_contacts1 extends MailingTargets */ public function formFilter() { - global $langs; + global $langs,$conf; // Load translation files required by the page $langs->loadLangs(array("commercial", "companies", "suppliers", "categories")); @@ -308,11 +308,12 @@ class mailing_contacts1 extends MailingTargets $s .= ajax_combobox("filter_category_supplier_contact"); // Choose language - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; - $formadmin = new FormAdmin($this->db); - $s .= ''.$langs->trans("DefaultLang").': '; - $s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang', 0, 0, 1, 0, 0, '', 0, 0, 0, null, 1); - + if (getDolGlobalInt('MAIN_MULTILANGS')) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($this->db); + $s .= ''.$langs->trans("DefaultLang").': '; + $s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang', 0, 0, 1, 0, 0, '', 0, 0, 0, null, 1); + } return $s; }