From d9ebc43cb6798cabd8f98aa34e406dcaf037d2c9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 16 Oct 2012 17:53:37 +0200 Subject: [PATCH] Fix: compatibility with multicompany sharings --- htdocs/categories/categorie.php | 1 + htdocs/fourn/fiche.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 2a6e437c765..360834f0b22 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -61,6 +61,7 @@ if ($id || $ref) $elementtype = 'fournisseur'; $objecttype = 'societe&categorie'; $objectid = isset($id)?$id:(isset($socid)?$socid:''); + $dbtablename = '&societe'; $fieldid = 'rowid'; } if ($type == 2) { diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index c0efba8e80e..6374021e6c4 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -44,7 +44,7 @@ $action = GETPOST('action'); // Security check $id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int')); 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); @@ -403,7 +403,7 @@ if ($object->fetch($id)) // List of contacts show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id); } - + // Addresses list if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB)) {