2
0
forked from Wavyzz/dolibarr

fix warnings

This commit is contained in:
Frédéric FRANCE
2021-10-23 07:20:30 +02:00
parent 9bd31d2b85
commit cad2cf9b6f
7 changed files with 13 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
$langs->loadLangs(array('bookmarks', 'other'));
// Security check
if (!$user->rights->bookmark->lire) {
if (empty($user->rights->bookmark->lire)) {
restrictedArea($user, 'bookmarks');
}

View File

@@ -35,7 +35,7 @@ $toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
// Security check
if (!$user->rights->bookmark->lire) {
if (empty($user->rights->bookmark->lire)) {
restrictedArea($user, 'bookmarks');
}
$optioncss = GETPOST('optioncss', 'alpha');

View File

@@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page
$langs->loadLangs(array('banks', 'categories'));
if (!$user->rights->banque->lire) {
if (empty($user->rights->banque->lire)) {
accessforbidden();
}

View File

@@ -39,7 +39,7 @@ if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) {
if (empty($user->rights->banque->lire) && !$user->rights->banque->consolidate) {
accessforbidden();
}

View File

@@ -67,7 +67,7 @@ if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) {
if (empty($user->rights->banque->lire) && !$user->rights->banque->consolidate) {
accessforbidden();
}

View File

@@ -299,7 +299,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
$nbko++;
}
} elseif ($feature == 'cheque') {
if (!$user->rights->banque->cheque) {
if (empty($user->rights->banque->cheque)) {
$readok = 0;
$nbko++;
}
@@ -385,22 +385,22 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
$nbko++;
}
} elseif ($feature == 'commande_fournisseur') {
if (!$user->rights->fournisseur->commande->creer || !$user->rights->supplier_order->creer) {
if (empty($user->rights->fournisseur->commande->creer) || empty($user->rights->supplier_order->creer)) {
$createok = 0;
$nbko++;
}
} elseif ($feature == 'banque') {
if (!$user->rights->banque->modifier) {
if (empty($user->rights->banque->modifier)) {
$createok = 0;
$nbko++;
}
} elseif ($feature == 'cheque') {
if (!$user->rights->banque->cheque) {
if (empty($user->rights->banque->cheque)) {
$createok = 0;
$nbko++;
}
} elseif ($feature == 'import') {
if (!$user->rights->import->run) {
if (empty($user->rights->import->run)) {
$createok = 0;
$nbko++;
}
@@ -497,11 +497,11 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
$deleteok = 0;
}
} elseif ($feature == 'banque') {
if (!$user->rights->banque->modifier) {
if (empty($user->rights->banque->modifier)) {
$deleteok = 0;
}
} elseif ($feature == 'cheque') {
if (!$user->rights->banque->cheque) {
if (empty($user->rights->banque->cheque)) {
$deleteok = 0;
}
} elseif ($feature == 'ecm') {

View File

@@ -86,7 +86,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv
$accessallowed = 1;
} elseif ($modulepart == 'bank') {
$result = restrictedArea($user, 'banque', $id, 'bank_account');
if (!$user->rights->banque->lire) {
if (empty($user->rights->banque->lire)) {
accessforbidden();
}
$accessallowed = 1;