mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-11 18:32:32 +01:00
fix multiple warnings
This commit is contained in:
@@ -104,7 +104,7 @@ class FormContract
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
// If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project.
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) {
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) {
|
||||
// Do nothing
|
||||
} else {
|
||||
$labeltoshow = dol_trunc($obj->ref, 18);
|
||||
|
||||
@@ -99,7 +99,7 @@ class FormIntervention
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
// If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project.
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) {
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) {
|
||||
// Do nothing
|
||||
} else {
|
||||
$labeltoshow = dol_trunc($obj->ref, 18);
|
||||
|
||||
@@ -207,7 +207,7 @@ class FormProjets
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
// If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project.
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) {
|
||||
if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) {
|
||||
// Do nothing
|
||||
} else {
|
||||
if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user