diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 318d19e10b3..53d553aca16 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -110,7 +110,7 @@ if (! empty($canvas)) // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); -$fieldtype = (! empty($ref) ? 'ref' : 'rowid'); +$fieldtype = (! empty($id) ? 'rowid' : 'ref'); $result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype,$objcanvas); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context