diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index 42f80906574..d530b57b125 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -716,7 +716,7 @@ print '';
*/
// View product description in thirdparty language
-if (!empty($conf->global->MAIN_MULTILANGS)) {
+if (getDolGlobalInt('MAIN_MULTILANGS')) {
print '
';
print '| '.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").' | ';
print '';
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 3ca5bfbc655..845c2e1012d 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -347,7 +347,7 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->prod
}
// Multilangs
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
$sql = "SELECT label";
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
$sql .= " WHERE fk_product = ".((int) $objp->rowid);
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 7ffbfe814a8..7b6014c6bc1 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -179,7 +179,7 @@ $fieldstosearchall = array(
);
// multilang
-if (!empty($conf->global->MAIN_MULTILANGS)) {
+if (getDolGlobalInt('MAIN_MULTILANGS')) {
$fieldstosearchall['pl.label'] = 'ProductLabelTranslated';
$fieldstosearchall['pl.description'] = 'ProductDescriptionTranslated';
$fieldstosearchall['pl.note'] = 'ProductNoteTranslated';
@@ -444,7 +444,7 @@ if (!empty($searchCategoryProductList) || !empty($catid)) {
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
// multilang
-if (!empty($conf->global->MAIN_MULTILANGS)) {
+if (getDolGlobalInt('MAIN_MULTILANGS')) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$db->escape($langs->getDefaultLang())."'";
}
@@ -1309,7 +1309,7 @@ if ($resql) {
$obj = $db->fetch_object($resql);
// Multilangs
- if (!empty($conf->global->MAIN_MULTILANGS)) { // If multilang is enabled
+ if (getDolGlobalInt('MAIN_MULTILANGS')) { // If multilang is enabled
$sql = "SELECT label";
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
$sql .= " WHERE fk_product = ".((int) $obj->rowid);
diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php
index f657eef99eb..4bde44f1892 100644
--- a/htdocs/product/popuprop.php
+++ b/htdocs/product/popuprop.php
@@ -214,7 +214,7 @@ print " |
\n";
if ($mode && $mode != '-1') {
foreach ($infoprod as $prodid => $vals) {
// 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) $prodid);
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index 31a2060287f..f3ad55d526d 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -608,7 +608,7 @@ while ($i < $imaxinloop) {
$objp = $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
// TODO Use a cache
$sql = "SELECT label";
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";