From a7f42b3fdfeba4783575e303d370877d665e949f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Sun, 17 Nov 2019 01:25:44 +0100 Subject: [PATCH] Inject $user for createProductCombination --- htdocs/variants/combinations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 714ee07ed3f..f8a8b9cc9e5 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -141,7 +141,7 @@ if ($_POST) { if (!$prodcomb->fetchByProductCombination2ValuePairs($id, $sanit_features)) { - $result = $prodcomb->createProductCombination($object, $sanit_features, array(), $price_impact_percent, $price_impact, $weight_impact); + $result = $prodcomb->createProductCombination($user, $object, $sanit_features, array(), $price_impact_percent, $price_impact, $weight_impact); if ($result > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); @@ -268,7 +268,7 @@ if ($action === 'confirm_deletecombination') { if ($prodstatic->fetch('', $dest_product) > 0) { //To prevent from copying to the same product if ($prodstatic->ref != $object->ref) { - if ($prodcomb->copyAll($object->id, $prodstatic) > 0) { + if ($prodcomb->copyAll($user, $object->id, $prodstatic) > 0) { header('Location: '.dol_buildpath('/variants/combinations.php?id='.$prodstatic->id, 2)); exit(); } else {