From 9d2fb85f59c455f1fac5699afd5459a7046111d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Wed, 4 Jan 2023 17:04:54 +0100 Subject: [PATCH] =?UTF-8?q?correction=20bug=20sur=20le=20filtre=20des=20la?= =?UTF-8?q?ngues=20pour=20l'ajout=20aux=20liste=20d'emailing.=20Lorsque=20?= =?UTF-8?q?'Activer=20la=20prise=20en=20charge=20multilingue=20pour=20la?= =?UTF-8?q?=20relation=20client=20ou=20fournisseur'=20=C3=A9tait=20d=C3=A9?= =?UTF-8?q?sactiv=C3=A9,=20le=20champ=20langue=20des=20contacts=20et=20des?= =?UTF-8?q?=20tiers=20est=20egal=20=C3=A0=20NULL=20et=20ne=20correspond=20?= =?UTF-8?q?jamais=20au=20filtre=20de=20langue=20(le=20filtre=20de=20langue?= =?UTF-8?q?=20est=20donc=20maintenant=20d=C3=A9sactiv=C3=A9=20dans=20le=20?= =?UTF-8?q?module=20thirdparties)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/modules/mailings/contacts1.modules.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 83e9e3ff277..9a9be018b79 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -120,7 +120,7 @@ class mailing_contacts1 extends MailingTargets */ public function formFilter() { - global $langs; + global $conf,$langs; // Load translation files required by the page $langs->loadLangs(array("commercial", "companies", "suppliers", "categories")); @@ -305,11 +305,13 @@ 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')) { + // 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_thirdparties', 0, null, 1, 0, 0, '', 0, 0, 0, null, 1); + } return $s; }