fix multiple warnings

This commit is contained in:
Frédéric FRANCE
2021-10-22 22:22:55 +02:00
parent 46c4f28478
commit fafabe3be2
4 changed files with 7 additions and 7 deletions

View File

@@ -279,12 +279,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
}
if ($feature == 'societe') {
if (!$user->rights->societe->lire && !$user->rights->fournisseur->lire) {
if (empty($user->rights->societe->lire) && !$user->rights->fournisseur->lire) {
$readok = 0;
$nbko++;
}
} elseif ($feature == 'contact') {
if (!$user->rights->societe->contact->lire) {
if (empty($user->rights->societe->contact->lire)) {
$readok = 0;
$nbko++;
}
@@ -370,12 +370,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) {
foreach ($featuresarray as $feature) {
if ($feature == 'contact') {
if (!$user->rights->societe->contact->creer) {
if (empty($user->rights->societe->contact->creer)) {
$createok = 0;
$nbko++;
}
} elseif ($feature == 'produit|service') {
if (!$user->rights->produit->creer && !$user->rights->service->creer) {
if (empty($user->rights->produit->creer) && empty($user->rights->service->creer)) {
$createok = 0;
$nbko++;
}