use isModEnabled

This commit is contained in:
Frédéric FRANCE 2023-03-08 08:50:19 +01:00
parent c9d869f837
commit 30aa377528
2 changed files with 5 additions and 5 deletions

View File

@ -207,7 +207,7 @@ if ($cancel) {
$action = ''; $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)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) {
$createbarcode = 0; $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)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) {
$showbarcode = 0; $showbarcode = 0;
} }
@ -1984,7 +1984,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} }
// Barcode // 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)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) {
$showbarcode = 0; $showbarcode = 0;
} }
@ -2312,7 +2312,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else { } else {
// Fiche en mode visu // 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)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) {
$showbarcode = 0; $showbarcode = 0;
} }

View File

@ -377,7 +377,7 @@ llxHeader("", $title);
if (!empty($id) || !empty($ref)) { 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)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) {
$showbarcode = 0; $showbarcode = 0;
} }