From e9d32c882291c2eded62dca1b4ae5ae4ca02f7fe Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 16 Nov 2022 14:31:59 +0100 Subject: [PATCH] NEW hook printFieldListFrom in contact list --- htdocs/contact/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 2bfdf9d1f66..39feeb125f4 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -402,6 +402,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_stcommcontact as st ON st.id = p.fk_stco if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; } +// Add fields from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; $sql .= ' WHERE p.entity IN ('.getEntity('contact').')'; if (empty($user->rights->societe->client->voir) && !$socid) { //restriction $sql .= " AND (sc.fk_user = ".((int) $user->id)." OR p.fk_soc IS NULL)";