Merge pull request #20472 from hregis/fix_avoid_hooks_conflict
NEW add hooks contact tab badge and hooks parameter for avoid conflicts
This commit is contained in:
commit
f07e11179d
@ -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;
|
||||
}
|
||||
|
||||
@ -64,7 +64,15 @@ function societe_prepare_head(Societe $object)
|
||||
} else {
|
||||
$sql = "SELECT COUNT(p.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
// 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 = ".((int) $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