From d82765c6da905210355d37a071060caa0da0a222 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Jan 2021 12:15:56 +0100 Subject: [PATCH] Update card.php --- htdocs/comm/card.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index e8af0199e5e..97d61cfdce1 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -97,11 +97,6 @@ if ($object->id > 0) { $now = dol_now(); - -/* - * Actions - */ - if ($id > 0 && empty($object->id)) { // Load data of third party @@ -109,6 +104,12 @@ if ($id > 0 && empty($object->id)) if ($object->id < 0) dol_print_error($db, $object->error, $object->errors); } + + +/* + * Actions + */ + $parameters = array('id' => $id, 'socid' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');