Merge pull request #18825 from grandoc/new_branch_25_09_2021

fix : warning: Undefined property: stdClass:: in C:\wamp64\www\doliba…
This commit is contained in:
Laurent Destailleur
2021-09-28 12:56:43 +02:00
committed by GitHub
6 changed files with 9 additions and 6 deletions

View File

@@ -373,7 +373,7 @@ if ($conf->product->enabled) {
print '</td>';
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\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 '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&amp;value='.urlencode($file).'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';

View File

@@ -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);
}
/**

View File

@@ -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);
}
/**

View File

@@ -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);
}
/**

View File

@@ -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);
}
/**

View File

@@ -59,8 +59,11 @@ if (empty($font_loc)) {
if (defined('PHP-BARCODE_PATH_COMMAND')) {
$genbarcode_loc = constant('PHP-BARCODE_PATH_COMMAND');
} else {
$genbarcode_loc = '';
if (!empty($conf->global->GENBARCODE_LOCATION)) {
$genbarcode_loc = $conf->global->GENBARCODE_LOCATION;
}
}