diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 241aec60d8e..b42384e934d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -207,7 +207,7 @@ if ($cancel) { $action = ''; } -$createbarcode = empty($conf->barcode->enabled) ? 0 : 1; +$createbarcode = isModEnabled('barcode'); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) { $createbarcode = 0; } @@ -1419,7 +1419,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + $showbarcode = isModEnabled('barcode'); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; } @@ -1984,7 +1984,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Barcode - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + $showbarcode = isModEnabled('barcode'); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; } @@ -2312,7 +2312,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } else { // Fiche en mode visu - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + $showbarcode = isModEnabled('barcode'); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; } diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 4c2b77ce766..7424f7474c0 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -377,7 +377,7 @@ llxHeader("", $title); if (!empty($id) || !empty($ref)) { - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + $showbarcode = isModEnabled('barcode'); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; }