From 3a9e238dc622907f08f03d65f4c38067e2cebb78 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Jan 2020 12:00:27 +0100 Subject: [PATCH] FIX Missing value of $formconfirm as parameters of hook --- htdocs/admin/emailcollector_card.php | 2 +- htdocs/asset/card.php | 2 +- htdocs/bom/bom_card.php | 2 +- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card.php | 2 +- htdocs/compta/prelevement/card.php | 2 +- htdocs/contrat/card.php | 1 + htdocs/expedition/card.php | 2 +- htdocs/expedition/shipment.php | 2 +- htdocs/fichinter/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/modulebuilder/template/myobject_card.php | 2 +- htdocs/mrp/mo_card.php | 2 +- htdocs/mrp/mo_production.php | 2 +- htdocs/product/inventory/card.php | 2 +- htdocs/product/inventory/inventory.php | 2 +- htdocs/product/stock/card.php | 2 +- htdocs/reception/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- htdocs/website/websiteaccount_card.php | 2 +- htdocs/zapier/hook_card.php | 2 +- 23 files changed, 23 insertions(+), 22 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 49217b55963..b9a787cc67c 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -349,7 +349,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 5c28e7843ba..b4ff4ebac68 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -224,7 +224,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 70036d6a099..87396dccb30 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -449,7 +449,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 8c46cb162d3..f55861b00cc 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1953,7 +1953,7 @@ if ($action == 'create') } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 7da9fcca7d1..3c1bf672c0f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2064,7 +2064,7 @@ if ($action == 'create' && $usercancreate) } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); // Note that $action and $object may be modified by hook $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index f72a3ed7f13..15200582ced 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3889,7 +3889,7 @@ elseif ($id > 0 || !empty($ref)) } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 0b8a441dea2..fdb4284e909 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -248,7 +248,7 @@ if ($id > 0 || $ref) } // Call Hook formConfirm - /*$parameters = array(); + /*$parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;*/ diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index fccae47fd89..c80dda1da91 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1356,6 +1356,7 @@ else // Call Hook formConfirm $parameters = array( + 'formConfirm' => $formconfirm, 'id' => $id, //'lineid' => $lineid, ); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 0b9682f5f06..66b47ab563f 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1693,7 +1693,7 @@ elseif ($id || $ref) } // Call Hook formConfirm - $parameters = array(); + $parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 4834152127f..5039af22e84 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -261,7 +261,7 @@ if ($id > 0 || !empty($ref)) } // Call Hook formConfirm - $parameters = array(); + $parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index d2a4171eb4f..c096a889ab4 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1168,7 +1168,7 @@ elseif ($id > 0 || !empty($ref)) if (!$formconfirm) { - $parameters = array('lineid'=>$lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 59c01d95297..9adad176ab2 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1907,7 +1907,7 @@ elseif (!empty($object->id)) $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } - $parameters = array('lineid'=>$lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d7a258b517e..ffdfb07baa0 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2406,7 +2406,7 @@ else if (!$formconfirm) { - $parameters = array('lineid'=>$lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 8540612f3a7..cc87e83d5c0 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -311,7 +311,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index bb3b19511ea..abaf216b7ab 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -406,7 +406,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 0d7fb48e45c..873b154ffeb 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -442,7 +442,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 0c913834738..3d389cf7eb2 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -240,7 +240,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index f43f1fc3b1c..b6021c82cb8 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -174,7 +174,7 @@ if ($object->id > 0) } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index d6a1914afc5..99dc1978886 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -362,7 +362,7 @@ else } // Call Hook formConfirm - $parameters = array(); + $parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index eaec20db955..b2723a0ce6a 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1277,7 +1277,7 @@ elseif ($id || $ref) } if (!$formconfirm) { - $parameters = array(); + $parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index f01ad4c0b1b..5067a4935bc 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1441,7 +1441,7 @@ if ($action == 'create') } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 64fbd96dd61..36eb72dd916 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -211,7 +211,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; diff --git a/htdocs/zapier/hook_card.php b/htdocs/zapier/hook_card.php index c2eaa616cae..d4dec007d86 100644 --- a/htdocs/zapier/hook_card.php +++ b/htdocs/zapier/hook_card.php @@ -247,7 +247,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Call Hook formConfirm - $parameters = array('lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;