Skip to content
Snippets Groups Projects
Commit 15aa2497 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: compatibility with multicompany sharings

parent 26a5ac53
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,7 @@ if ($id || $ref) ...@@ -62,6 +62,7 @@ if ($id || $ref)
$elementtype = 'fournisseur'; $elementtype = 'fournisseur';
$objecttype = 'societe&categorie'; $objecttype = 'societe&categorie';
$objectid = isset($id)?$id:(isset($socid)?$socid:''); $objectid = isset($id)?$id:(isset($socid)?$socid:'');
$dbtablename = '&societe';
$fieldid = 'rowid'; $fieldid = 'rowid';
} }
elseif ($type == 2) { elseif ($type == 2) {
......
...@@ -44,7 +44,7 @@ $action = GETPOST('action'); ...@@ -44,7 +44,7 @@ $action = GETPOST('action');
// Security check // Security check
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int')); $id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
if ($user->societe_id) $id=$user->societe_id; if ($user->societe_id) $id=$user->societe_id;
$result = restrictedArea($user, 'societe&fournisseur', $id, ''); $result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
$object = new Fournisseur($db); $object = new Fournisseur($db);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment