Merge pull request #24155 from frederic34/barcodeenabled

use isModEnabled
This commit is contained in:
Laurent Destailleur 2023-03-10 18:40:33 +01:00 committed by GitHub
commit be2597e2c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}