NEW add hooks contact tab badge and hooks parameter for avoid conflicts
This commit is contained in:
parent
c2a088c5ff
commit
97a1774bf3
@ -8864,7 +8864,7 @@ class Form
|
||||
|
||||
// Add where from hooks
|
||||
if (is_object($hookmanager)) {
|
||||
$parameters = array();
|
||||
$parameters = array('showrefnav' => true);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$object->next_prev_filter .= $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
@ -65,6 +65,15 @@ function societe_prepare_head(Societe $object)
|
||||
$sql = "SELECT COUNT(p.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql .= " WHERE p.fk_soc = ".((int) $object->id);
|
||||
// Add table from hooks
|
||||
$parameters = array('contacttab' => true);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||
// Add where from hooks
|
||||
$parameters = array('contacttab' => true);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user