diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index de05203f5f6..5b48301c30d 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -373,7 +373,7 @@ if ($conf->product->enabled) { print ''; print ''.$modBarCode->getExample($langs)."\n"; - if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") { + if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM) && $conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; diff --git a/htdocs/core/boxes/box_members_by_type.php b/htdocs/core/boxes/box_members_by_type.php index 5b95b58d29d..0a5e4548e3f 100644 --- a/htdocs/core/boxes/box_members_by_type.php +++ b/htdocs/core/boxes/box_members_by_type.php @@ -68,7 +68,7 @@ class box_members_by_type extends ModeleBoxes $this->enabled = 0; // disabled for external users } - $this->hidden = !($user->rights->adherent->lire); + $this->hidden = !(!empty($conf->adherent->enabled) && $user->rights->adherent->lire); } /** diff --git a/htdocs/core/boxes/box_members_last_modified.php b/htdocs/core/boxes/box_members_last_modified.php index 9de6a3af12f..cf70bcafcb1 100644 --- a/htdocs/core/boxes/box_members_last_modified.php +++ b/htdocs/core/boxes/box_members_last_modified.php @@ -67,7 +67,7 @@ class box_members_last_modified extends ModeleBoxes $this->enabled = 0; // disabled for external users } - $this->hidden = !($user->rights->adherent->lire); + $this->hidden = !(!empty($conf->adherent->enabled) && $user->rights->adherent->lire); } /** diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index 3cea44c2dc3..949edd567f3 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -67,7 +67,7 @@ class box_members_last_subscriptions extends ModeleBoxes $this->enabled = 0; // disabled for external users } - $this->hidden = !($user->rights->adherent->lire); + $this->hidden = !(!empty($conf->adherent->enabled) && $user->rights->adherent->lire); } /** diff --git a/htdocs/core/boxes/box_members_subscriptions_by_year.php b/htdocs/core/boxes/box_members_subscriptions_by_year.php index be835511c6b..fe64f37c805 100644 --- a/htdocs/core/boxes/box_members_subscriptions_by_year.php +++ b/htdocs/core/boxes/box_members_subscriptions_by_year.php @@ -67,7 +67,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes $this->enabled = 0; // disabled for external users } - $this->hidden = !($user->rights->adherent->lire); + $this->hidden = !(!empty($conf->adherent->enabled) && $user->rights->adherent->lire); } /** diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 12022ed178c..702d6673527 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -59,7 +59,10 @@ if (empty($font_loc)) { if (defined('PHP-BARCODE_PATH_COMMAND')) { $genbarcode_loc = constant('PHP-BARCODE_PATH_COMMAND'); } else { - $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; + $genbarcode_loc = ''; + if (!empty($conf->global->GENBARCODE_LOCATION)) { + $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; + } }