diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index e759e93a635..406d7b5916c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1096,21 +1096,36 @@ class ActionComm extends CommonObject */ function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0) { - global $conf,$langs; + global $conf,$langs, $hookmanager; - $result=''; - $tooltip = '' . $langs->trans('ShowAction'.$objp->code) . ''; - if (! empty($this->ref)) - $tooltip .= '
' . $langs->trans('Ref') . ': ' . $this->ref; - if (! empty($this->label)) - $tooltip .= '
' . $langs->trans('Title') . ': ' . $this->label; - $label = $this->label; - if (empty($label)) $label=$this->libelle; // For backward compatibility - $linkclose = '" title="'.dol_escape_htmltag($tooltip, 1).'">'; - if ($option=='birthday') $link = ''; + if (! is_object($hookmanager)) + { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($this->db); + } + $hookmanager->initHooks(array('actiondao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose); + + if ($option=='birthday') + $link = 'libelle.'-'.$withpicto; if ($withpicto == 2) {