diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 335e3ac575a..71be0733fb2 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -316,7 +316,7 @@ class mailing_thirdparties extends MailingTargets $s .= ''; $s .= ajax_combobox("filter_status_thirdparties"); - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { // Choose language require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; $formadmin = new FormAdmin($this->db); diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index d2431d3e22c..a6bfdd47433 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -195,7 +195,7 @@ class modService extends DolibarrModules if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); } if (!empty($conf->global->PRODUCT_USE_UNITS)) { @@ -224,7 +224,7 @@ class modService extends DolibarrModules if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); } if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { @@ -243,7 +243,7 @@ class modService extends DolibarrModules if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); } if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { @@ -258,7 +258,7 @@ class modService extends DolibarrModules if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); } if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { @@ -272,7 +272,7 @@ class modService extends DolibarrModules if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; @@ -834,7 +834,7 @@ class modService extends DolibarrModules 'pr.date_price'=>'2013-04-10'); } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { // Import translations of product names and descriptions $r++; $this->import_code[$r] = $this->rights_class.'_languages'; diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index d93a7d99076..eb57e7c5453 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -491,7 +491,7 @@ class pdf_standard extends ModelePDFMovement $objp = $this->db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active + if (getDolGlobalInt('MAIN_MULTILANGS')) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product = ".((int) $objp->rowid); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index ea95036b280..8214b8243e9 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -793,7 +793,7 @@ class pdf_azur extends ModelePDFPropales // Find the desire PDF $filetomerge = new Propalmergepdfproduct($this->db); - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $filetomerge->fetch_by_product($line->fk_product, $outputlangs->defaultlang); } else { $filetomerge->fetch_by_product($line->fk_product); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index cdac495c393..049391450d8 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -918,7 +918,7 @@ class pdf_cyan extends ModelePDFPropales // Find the desire PDF $filetomerge = new Propalmergepdfproduct($this->db); - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $filetomerge->fetch_by_product($line->fk_product, $outputlangs->defaultlang); } else { $filetomerge->fetch_by_product($line->fk_product); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index d3fa898d0a1..6231fb492b0 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -306,7 +306,7 @@ class pdf_standard extends ModelePDFStock $objp = $this->db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active + if (getDolGlobalInt('MAIN_MULTILANGS')) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product = ".((int) $objp->rowid); diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 07595012466..8f27d747fab 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -243,7 +243,7 @@ print ''."\n"; print ''."\n"; // Customer Default Langauge -if (!empty($conf->global->MAIN_MULTILANGS)) { +if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''.$langs->trans("DefaultLang"); if (!empty($array_query['cust_language'])) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');