From 83ec64d4732e0bb726eb49d2f0c725d8a0e495d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 22:52:27 +0200 Subject: [PATCH] Add hook getnomurltooltip on contract --- htdocs/contrat/class/contrat.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6396b5e5f8863..cd40be49e6ceb 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1920,7 +1920,7 @@ public function LibStatut($statut, $mode) */ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { - global $conf, $langs, $user; + global $conf, $langs, $user, $hookmanager, $action; $result=''; @@ -1962,6 +1962,14 @@ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_ } $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip"'; + + if (is_object($hookmanager)) + { + $hookmanager->initHooks(array('contractdao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('getnomurltooltip', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $linkclose = $hookmanager->resPrint; + } } $linkstart = '