fix security check on fourn card
This commit is contained in:
parent
1feb22ea9c
commit
46d2b4d62d
@ -50,7 +50,7 @@ $cancelbutton = GETPOST('cancel');
|
|||||||
// 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, '&societe');
|
$result = restrictedArea($user, 'societe&fournisseur', $id, '&societe', '', 'rowid');
|
||||||
|
|
||||||
$object = new Fournisseur($db);
|
$object = new Fournisseur($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@ -107,7 +107,7 @@ if (empty($reshook))
|
|||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||||
|
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user