Merge pull request #8333 from atm-maxime/fix_advtargetemailin
Fix #8057
This commit is contained in:
commit
c755d5f58d
@ -991,9 +991,10 @@ class Contact extends CommonObject
|
|||||||
* @param string $option Where the link point to
|
* @param string $option Where the link point to
|
||||||
* @param int $maxlen Max length of
|
* @param int $maxlen Max length of
|
||||||
* @param string $moreparam Add more param into URL
|
* @param string $moreparam Add more param into URL
|
||||||
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='')
|
function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='',$notooltip=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
@ -1012,13 +1013,15 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'"';
|
$link = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'"';
|
||||||
$linkclose="";
|
$linkclose="";
|
||||||
|
if (empty($notooltip)) {
|
||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
$label=$langs->trans("ShowContact");
|
$label=$langs->trans("ShowContact");
|
||||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose.= ' class="classfortooltip">';
|
$linkclose.= ' class="classfortooltip"';
|
||||||
|
}
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
@ -1030,7 +1033,7 @@ class Contact extends CommonObject
|
|||||||
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$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;
|
if ($reshook > 0) $linkclose = $hookmanager->resPrint;
|
||||||
|
|
||||||
$link.=$linkclose;
|
$link.=$linkclose.'>';
|
||||||
|
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
|
|||||||
@ -289,11 +289,11 @@ class mailing_advthirdparties extends MailingTargets
|
|||||||
if ($type=='thirdparty') {
|
if ($type=='thirdparty') {
|
||||||
$companystatic=new Societe($this->db);
|
$companystatic=new Societe($this->db);
|
||||||
$companystatic->fetch($id);
|
$companystatic->fetch($id);
|
||||||
return $companystatic->getNomUrl(0);
|
return $companystatic->getNomUrl(0,'',0,1);
|
||||||
} elseif ($type=='contact') {
|
} elseif ($type=='contact') {
|
||||||
$contactstatic=new Contact($this->db);
|
$contactstatic=new Contact($this->db);
|
||||||
$contactstatic->fetch($id);
|
$contactstatic->fetch($id);
|
||||||
return $contactstatic->getNomUrl(0);
|
return $contactstatic->getNomUrl(0,'',0,'',1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user