Some indenting and hookmanager feature

This commit is contained in:
BENKE Charlie 2016-07-18 15:07:35 +02:00 committed by GitHub
parent 427a8c5bf4
commit 093f1da206

View File

@ -1096,7 +1096,7 @@ class ActionComm extends CommonObject
*/ */
function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0) function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0)
{ {
global $conf,$langs; global $conf,$langs, $hookmanager;
$result=''; $result='';
$tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>'; $tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>';
@ -1109,9 +1109,21 @@ class ActionComm extends CommonObject
if (! empty($this->location)) if (! empty($this->location))
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location; $tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
$linkclose = '" title="'.dol_escape_htmltag($tooltip, 1).'">'; $linkclose = ' class="'.$classname.' classfortooltip" title="'.dol_escape_htmltag($tooltip, 1).'">';
if ($option=='birthday') $link = '<a class="'.$classname.' classfortooltip" href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.$linkclose; if (! is_object($hookmanager))
else $link = '<a class="'.$classname.' classfortooltip" href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.$linkclose; {
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 = '<a href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'"'.$linkclose;
else
$link = '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.'"'.$linkclose;
$linkend='</a>'; $linkend='</a>';
//print 'rrr'.$this->libelle.'-'.$withpicto; //print 'rrr'.$this->libelle.'-'.$withpicto;