diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 611291556bd..2764f8371f3 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -39,6 +39,7 @@ if ($_REQUEST["socid"]) if ($_REQUEST["typeid"] == 1) { $type = 'fournisseur'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; } if ($_REQUEST["typeid"] == 2) { $type = 'societe'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; } $objectid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; + $type = 'societe'; } else if ($_REQUEST["id"] || $_REQUEST["ref"]) { diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 8422f5d5713..22ea9b3a2b2 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1251,7 +1251,7 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='') { if (! $user->rights->fournisseur->commande->lire) $readok=0; } - else + else if (! empty($features)) { if (! $user->rights->$feature->lire) $readok=0; }