Merge pull request #12808 from frederic34/patch-15

can replace formconfirm in order supplier
This commit is contained in:
Laurent Destailleur 2020-01-10 00:14:07 +01:00 committed by GitHub
commit 819a7dda31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1907,13 +1907,10 @@ 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);
}
if (!$formconfirm)
{
$parameters = array('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;
}
$parameters = array('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;
// Print form confirm
print $formconfirm;