forked from Wavyzz/dolibarr
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'));
|
$langs->loadLangs(array('bookmarks', 'other'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->rights->bookmark->lire) {
|
if (empty($user->rights->bookmark->lire)) {
|
||||||
restrictedArea($user, 'bookmarks');
|
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
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->rights->bookmark->lire) {
|
if (empty($user->rights->bookmark->lire)) {
|
||||||
restrictedArea($user, 'bookmarks');
|
restrictedArea($user, 'bookmarks');
|
||||||
}
|
}
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$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
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('banks', 'categories'));
|
$langs->loadLangs(array('banks', 'categories'));
|
||||||
|
|
||||||
if (!$user->rights->banque->lire) {
|
if (empty($user->rights->banque->lire)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ if ($user->socid) {
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
|
$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();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if ($user->socid) {
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
|
$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();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'cheque') {
|
} elseif ($feature == 'cheque') {
|
||||||
if (!$user->rights->banque->cheque) {
|
if (empty($user->rights->banque->cheque)) {
|
||||||
$readok = 0;
|
$readok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
@@ -385,22 +385,22 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'commande_fournisseur') {
|
} 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;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'banque') {
|
} elseif ($feature == 'banque') {
|
||||||
if (!$user->rights->banque->modifier) {
|
if (empty($user->rights->banque->modifier)) {
|
||||||
$createok = 0;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'cheque') {
|
} elseif ($feature == 'cheque') {
|
||||||
if (!$user->rights->banque->cheque) {
|
if (empty($user->rights->banque->cheque)) {
|
||||||
$createok = 0;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'import') {
|
} elseif ($feature == 'import') {
|
||||||
if (!$user->rights->import->run) {
|
if (empty($user->rights->import->run)) {
|
||||||
$createok = 0;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
@@ -497,11 +497,11 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
$deleteok = 0;
|
$deleteok = 0;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'banque') {
|
} elseif ($feature == 'banque') {
|
||||||
if (!$user->rights->banque->modifier) {
|
if (empty($user->rights->banque->modifier)) {
|
||||||
$deleteok = 0;
|
$deleteok = 0;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'cheque') {
|
} elseif ($feature == 'cheque') {
|
||||||
if (!$user->rights->banque->cheque) {
|
if (empty($user->rights->banque->cheque)) {
|
||||||
$deleteok = 0;
|
$deleteok = 0;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'ecm') {
|
} elseif ($feature == 'ecm') {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv
|
|||||||
$accessallowed = 1;
|
$accessallowed = 1;
|
||||||
} elseif ($modulepart == 'bank') {
|
} elseif ($modulepart == 'bank') {
|
||||||
$result = restrictedArea($user, 'banque', $id, 'bank_account');
|
$result = restrictedArea($user, 'banque', $id, 'bank_account');
|
||||||
if (!$user->rights->banque->lire) {
|
if (empty($user->rights->banque->lire)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
$accessallowed = 1;
|
$accessallowed = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user