NEW hook getnomurltooltip is replaced with hook getNomUrl more powerfull
This commit is contained in:
parent
83962ca70b
commit
c962b89495
@ -1273,7 +1273,7 @@ class ActionComm extends CommonObject
|
|||||||
$linkclose.=' title="'.dol_escape_htmltag($tooltip, 1).'"';
|
$linkclose.=' title="'.dol_escape_htmltag($tooltip, 1).'"';
|
||||||
$linkclose.=' class="'.$classname.' classfortooltip"';
|
$linkclose.=' class="'.$classname.' classfortooltip"';
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -1282,6 +1282,7 @@ class ActionComm extends CommonObject
|
|||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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
|
||||||
$linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose);
|
$linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else $linkclose.=' class="'.$classname.'"';
|
else $linkclose.=' class="'.$classname.'"';
|
||||||
|
|
||||||
@ -1327,6 +1328,18 @@ class ActionComm extends CommonObject
|
|||||||
$result.=$libelleshort;
|
$result.=$libelleshort;
|
||||||
$result.=$linkend;
|
$result.=$linkend;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
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, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1124,7 +1124,7 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
$linkclose.='>';
|
$linkclose.='>';
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -1132,7 +1132,7 @@ class Contact extends CommonObject
|
|||||||
$hookmanager->initHooks(array('contactdao'));
|
$hookmanager->initHooks(array('contactdao'));
|
||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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;*/
|
||||||
|
|
||||||
$linkstart.=$linkclose;
|
$linkstart.=$linkclose;
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
@ -1143,12 +1143,23 @@ class Contact extends CommonObject
|
|||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result.=$linkstart;
|
$result.=$linkstart;
|
||||||
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
|
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
|
||||||
if ($withpicto != 2) $result.=($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs));
|
if ($withpicto != 2) $result.=($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs));
|
||||||
$result.=$linkend;
|
$result.=$linkend;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('contactdao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3575,7 +3575,7 @@ class Product extends CommonObject
|
|||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
|
||||||
$linkclose.= ' class="classfortooltip"';
|
$linkclose.= ' class="classfortooltip"';
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -3584,6 +3584,7 @@ class Product extends CommonObject
|
|||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($option == 'supplier' || $option == 'category') {
|
if ($option == 'supplier' || $option == 'category') {
|
||||||
@ -3615,6 +3616,19 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
$result.= $newref;
|
$result.= $newref;
|
||||||
$result.= $linkend;
|
$result.= $linkend;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('productdao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1021,17 +1021,18 @@ class Project extends CommonObject
|
|||||||
$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)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('projectdao'));
|
||||||
|
$parameters=array('id'=>$this->id);
|
||||||
|
// Note that $action and $object may have been modified by some hooks
|
||||||
|
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action);
|
||||||
|
if ($reshook > 0)
|
||||||
|
$linkclose = $hookmanager->resPrint;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
$hookmanager->initHooks(array('projectdao'));
|
|
||||||
$parameters=array('id'=>$this->id);
|
|
||||||
// Note that $action and $object may have been modified by some hooks
|
|
||||||
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action);
|
|
||||||
if ($reshook > 0)
|
|
||||||
$linkclose = $hookmanager->resPrint;
|
|
||||||
}
|
|
||||||
|
|
||||||
$picto = 'projectpub';
|
$picto = 'projectpub';
|
||||||
if (! $this->public) $picto = 'project';
|
if (! $this->public) $picto = 'project';
|
||||||
@ -1046,6 +1047,18 @@ class Project extends CommonObject
|
|||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
if ($withpicto != 2) $result.=(($addlabel && $this->title) ? $sep . dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : '');
|
if ($withpicto != 2) $result.=(($addlabel && $this->title) ? $sep . dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : '');
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('projectdao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2095,7 +2095,7 @@ class Societe extends CommonObject
|
|||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose.=' class="classfortooltip refurl"';
|
$linkclose.=' class="classfortooltip refurl"';
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -2104,6 +2104,7 @@ class Societe extends CommonObject
|
|||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
$linkstart.=$linkclose.'>';
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
@ -2120,6 +2121,18 @@ class Societe extends CommonObject
|
|||||||
if ($withpicto != 2) $result.=($maxlen?dol_trunc($name,$maxlen):$name);
|
if ($withpicto != 2) $result.=($maxlen?dol_trunc($name,$maxlen):$name);
|
||||||
$result.=$linkend;
|
$result.=$linkend;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('societedao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2201,7 +2201,7 @@ class User extends CommonObject
|
|||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||||
}
|
}
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -2210,6 +2210,7 @@ class User extends CommonObject
|
|||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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;
|
||||||
|
*/
|
||||||
|
|
||||||
$linkstart.=$linkclose.'>';
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
@ -2238,6 +2239,18 @@ class User extends CommonObject
|
|||||||
|
|
||||||
$result.=$companylink;
|
$result.=$companylink;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('userdao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -836,7 +836,7 @@ class UserGroup extends CommonObject
|
|||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||||
}
|
}
|
||||||
if (! is_object($hookmanager))
|
/*if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
@ -845,6 +845,7 @@ class UserGroup extends CommonObject
|
|||||||
$parameters=array('id'=>$this->id);
|
$parameters=array('id'=>$this->id);
|
||||||
$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;
|
||||||
|
*/
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="'.$url.'"';
|
||||||
$linkstart.=$linkclose.'>';
|
$linkstart.=$linkclose.'>';
|
||||||
@ -855,6 +856,18 @@ class UserGroup extends CommonObject
|
|||||||
if ($withpicto != 2) $result.= $this->name;
|
if ($withpicto != 2) $result.= $this->name;
|
||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
|
|
||||||
|
global $action;
|
||||||
|
if (! is_object($hookmanager))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
}
|
||||||
|
$hookmanager->initHooks(array('groupdao'));
|
||||||
|
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
|
||||||
|
$reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) $result = $hookmanager->resPrint;
|
||||||
|
else $result .= $hookmanager->resPrint;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user