2
0
forked from Wavyzz/dolibarr

Fix test on precommit hook

This commit is contained in:
Laurent Destailleur
2021-03-12 14:30:32 +01:00
parent ab9d10edd3
commit dc5557e4f7
2 changed files with 38 additions and 21 deletions

View File

@@ -35,13 +35,12 @@ $langs->load("companies");
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GET PO ST('action','aZ09');
$action = GETPOST('action', 'aZ09');
// Security check
$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
if ($user->socid)
{
if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);