fix multiple warnings
This commit is contained in:
parent
46c4f28478
commit
fafabe3be2
@ -104,7 +104,7 @@ class FormContract
|
|||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$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 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
|
// Do nothing
|
||||||
} else {
|
} else {
|
||||||
$labeltoshow = dol_trunc($obj->ref, 18);
|
$labeltoshow = dol_trunc($obj->ref, 18);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class FormIntervention
|
|||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$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 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
|
// Do nothing
|
||||||
} else {
|
} else {
|
||||||
$labeltoshow = dol_trunc($obj->ref, 18);
|
$labeltoshow = dol_trunc($obj->ref, 18);
|
||||||
|
|||||||
@ -207,7 +207,7 @@ class FormProjets
|
|||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$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 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
|
// Do nothing
|
||||||
} else {
|
} else {
|
||||||
if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected
|
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 ($feature == 'societe') {
|
||||||
if (!$user->rights->societe->lire && !$user->rights->fournisseur->lire) {
|
if (empty($user->rights->societe->lire) && !$user->rights->fournisseur->lire) {
|
||||||
$readok = 0;
|
$readok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'contact') {
|
} elseif ($feature == 'contact') {
|
||||||
if (!$user->rights->societe->contact->lire) {
|
if (empty($user->rights->societe->contact->lire)) {
|
||||||
$readok = 0;
|
$readok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
@ -370,12 +370,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) {
|
if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) {
|
||||||
foreach ($featuresarray as $feature) {
|
foreach ($featuresarray as $feature) {
|
||||||
if ($feature == 'contact') {
|
if ($feature == 'contact') {
|
||||||
if (!$user->rights->societe->contact->creer) {
|
if (empty($user->rights->societe->contact->creer)) {
|
||||||
$createok = 0;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
} elseif ($feature == 'produit|service') {
|
} 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;
|
$createok = 0;
|
||||||
$nbko++;
|
$nbko++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user