NEW hook printFieldListFrom in contact list
This commit is contained in:
parent
9921ce8edc
commit
e9d32c8822
@ -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) {
|
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
$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').')';
|
$sql .= ' WHERE p.entity IN ('.getEntity('contact').')';
|
||||||
if (empty($user->rights->societe->client->voir) && !$socid) { //restriction
|
if (empty($user->rights->societe->client->voir) && !$socid) { //restriction
|
||||||
$sql .= " AND (sc.fk_user = ".((int) $user->id)." OR p.fk_soc IS NULL)";
|
$sql .= " AND (sc.fk_user = ".((int) $user->id)." OR p.fk_soc IS NULL)";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user