From 50a6cac094cbef6b01cb90f8d2fdc60498b226e9 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 7 May 2014 17:23:38 +0200 Subject: [PATCH] Add hook on comm/fiche.php to manage doAction and buttons --- htdocs/comm/fiche.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 0b9ba29da08..7a79b658a76 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -67,12 +67,19 @@ $pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="nom"; +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('commcard')); + $object = new Societe($db); /* * Actions */ +$parameters = array('socid' => $id); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some + + if ($action == 'setcustomeraccountancycode') { $result=$object->fetch($id); @@ -814,6 +821,11 @@ if ($id > 0) /* * Barre d'actions */ + + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been + + print '
'; if (! empty($conf->propal->enabled) && $user->rights->propal->creer)