mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-08 10:38:15 +01:00
fix warnings
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user