Clean code

This commit is contained in:
Laurent Destailleur 2018-06-04 12:55:55 +02:00
parent a6104d18a9
commit 29ee5dffc4
14 changed files with 63 additions and 101 deletions

View File

@ -1258,11 +1258,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)) /*
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('actiondao')); $hookmanager->initHooks(array('actiondao'));
$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
@ -1321,11 +1317,6 @@ class ActionComm extends CommonObject
$result.=$linkend; $result.=$linkend;
global $action; 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')); $hookmanager->initHooks(array('actiondao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -1111,7 +1111,6 @@ class Contact extends CommonObject
$url .= $moreparam; $url .= $moreparam;
$linkstart = '<a href="'.$url.'"';
$linkclose=""; $linkclose="";
if (empty($notooltip)) { if (empty($notooltip)) {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
@ -1121,20 +1120,17 @@ class Contact extends CommonObject
} }
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.= ' class="classfortooltip"'; $linkclose.= ' class="classfortooltip"';
}
$linkclose.='>';
/*if (! is_object($hookmanager)) /*
{ $hookmanager->initHooks(array('contactdao'));
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $parameters=array('id'=>$this->id);
$hookmanager=new HookManager($this->db); $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;
*/
} }
$hookmanager->initHooks(array('contactdao'));
$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.=$linkclose; $linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($option == 'xxx') if ($option == 'xxx')
@ -1149,11 +1145,6 @@ class Contact extends CommonObject
$result.=$linkend; $result.=$linkend;
global $action; 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')); $hookmanager->initHooks(array('contactdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -1008,6 +1008,14 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
// If syslog module enabled // If syslog module enabled
if (empty($conf->syslog->enabled)) return; if (empty($conf->syslog->enabled)) return;
if ($ident < 0)
{
foreach ($conf->loghandlers as $loghandlerinstance)
{
$loghandlerinstance->setIdent($ident);
}
}
if (! empty($message)) if (! empty($message))
{ {
// Test log level // Test log level
@ -1060,7 +1068,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
unset($data); unset($data);
} }
if (! empty($ident)) if ($ident > 0)
{ {
foreach ($conf->loghandlers as $loghandlerinstance) foreach ($conf->loghandlers as $loghandlerinstance)
{ {
@ -4296,7 +4304,7 @@ function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betwee
print '<div class="pagination"><ul>'; print '<div class="pagination"><ul>';
if ((int) $limit >= 0 && empty($hideselectlimit)) if ((int) $limit >= 0 && empty($hideselectlimit))
{ {
$pagesizechoices='10:10,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000'; $pagesizechoices='10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000';
//$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported //$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported
//$pagesizechoices.=',2:2'; //$pagesizechoices.=',2:2';
if (! empty($conf->global->MAIN_PAGESIZE_CHOICES)) $pagesizechoices=$conf->global->MAIN_PAGESIZE_CHOICES; if (! empty($conf->global->MAIN_PAGESIZE_CHOICES)) $pagesizechoices=$conf->global->MAIN_PAGESIZE_CHOICES;

View File

@ -40,7 +40,7 @@ AccountWithNonZeroValues=Accounts with non zero values
ListOfAccounts=List of accounts ListOfAccounts=List of accounts
MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup
MainAccountForSuppliersNotDefined=Main accounting account for veo not defined in setup MainAccountForSuppliersNotDefined=Main accounting account for vendors not defined in setup
MainAccountForUsersNotDefined=Main accounting account for users not defined in setup MainAccountForUsersNotDefined=Main accounting account for users not defined in setup
MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup

View File

@ -32,7 +32,7 @@ ErrorBarCodeRequired=Bar code required
ErrorCustomerCodeAlreadyUsed=Customer code already used ErrorCustomerCodeAlreadyUsed=Customer code already used
ErrorBarCodeAlreadyUsed=Bar code already used ErrorBarCodeAlreadyUsed=Bar code already used
ErrorPrefixRequired=Prefix required ErrorPrefixRequired=Prefix required
ErrorBadSupplierCodeSyntax=Bad syntax for endor code ErrorBadSupplierCodeSyntax=Bad syntax for vendor code
ErrorSupplierCodeRequired=Vendor code required ErrorSupplierCodeRequired=Vendor code required
ErrorSupplierCodeAlreadyUsed=Vendor code already used ErrorSupplierCodeAlreadyUsed=Vendor code already used
ErrorBadParameters=Bad parameters ErrorBadParameters=Bad parameters

View File

@ -166,4 +166,4 @@ InGoingEmailSetup=Incoming email setup
OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing) OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing)
DefaultOutgoingEmailSetup=Default outgoing email setup DefaultOutgoingEmailSetup=Default outgoing email setup
Information=Information Information=Information
ContactsWithThirdpartyFilter=Contact avec filtre client ContactsWithThirdpartyFilter=Contacts avec filtre client

View File

@ -58,8 +58,8 @@ NameOnCard=Name on card
CardNumber=Card Number CardNumber=Card Number
ExpiryDate=Expiry Date ExpiryDate=Expiry Date
CVN=CVN CVN=CVN
DeleteACard=Delete Card record DeleteACard=Delete Card
ConfirmDeleteCard=Are you sure you want to delete this Card record? ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card?
CreateCustomerOnStripe=Create customer on Stripe CreateCustomerOnStripe=Create customer on Stripe
CreateCardOnStripe=Create card on Stripe CreateCardOnStripe=Create card on Stripe
ShowInStripe=Show in Stripe ShowInStripe=Show in Stripe

View File

@ -285,7 +285,7 @@ class MyObject extends CommonObject
*/ */
function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
{ {
global $db, $conf, $langs; global $db, $conf, $langs, $hoomanager;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager; global $menumanager;
@ -318,6 +318,13 @@ class MyObject 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:'').'"';
/*
$hookmanager->initHooks(array('myobjectdao'));
$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;
*/
} }
else $linkclose = ($morecss?' class="'.$morecss.'"':''); else $linkclose = ($morecss?' class="'.$morecss.'"':'');
@ -331,6 +338,13 @@ class MyObject extends CommonObject
$result .= $linkend; $result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
global $action;
$hookmanager->initHooks(array('myobjectdao'));
$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;
} }

View File

@ -3599,11 +3599,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)) /*
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('productdao')); $hookmanager->initHooks(array('productdao'));
$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
@ -3642,11 +3638,6 @@ class Product extends CommonObject
$result.= $linkend; $result.= $linkend;
global $action; 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')); $hookmanager->initHooks(array('productdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -940,7 +940,7 @@ class Project extends CommonObject
*/ */
function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='', $sep=' - ', $notooltip=0, $save_lastsearch_value=-1) function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='', $sep=' - ', $notooltip=0, $save_lastsearch_value=-1)
{ {
global $conf, $langs, $user; global $conf, $langs, $user, $hookmanager;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
@ -989,10 +989,7 @@ 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)) { /*
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('projectdao')); $hookmanager->initHooks(array('projectdao'));
$parameters=array('id'=>$this->id); $parameters=array('id'=>$this->id);
// Note that $action and $object may have been modified by some hooks // Note that $action and $object may have been modified by some hooks
@ -1016,11 +1013,6 @@ class Project extends CommonObject
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; 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')); $hookmanager->initHooks(array('projectdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -2098,11 +2098,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)) /*
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('thirdpartydao')); $hookmanager->initHooks(array('thirdpartydao'));
$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
@ -2125,11 +2121,6 @@ class Societe extends CommonObject
$result.=$linkend; $result.=$linkend;
global $action; global $action;
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('thirdpartydao')); $hookmanager->initHooks(array('thirdpartydao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -44,8 +44,8 @@ $colorbacktabcard1='255,255,255'; // card
$colorbacktabactive='234,234,234'; $colorbacktabactive='234,234,234';
$colorbacklineimpair1='255,255,255'; // line impair $colorbacklineimpair1='255,255,255'; // line impair
$colorbacklineimpair2='255,255,255'; // line impair $colorbacklineimpair2='255,255,255'; // line impair
$colorbacklinepair1='246,246,246'; // line pair $colorbacklinepair1='250,250,250'; // line pair
$colorbacklinepair2='246,246,246'; // line pair $colorbacklinepair2='250,250,250'; // line pair
$colorbacklinepairhover='238,246,252'; // line pair $colorbacklinepairhover='238,246,252'; // line pair
$colorbacklinebreak='214,218,220'; // line break $colorbacklinebreak='214,218,220'; // line break
$colorbackbody='255,255,255'; $colorbackbody='255,255,255';
@ -3103,7 +3103,7 @@ div.tabBar .noborder {
/* Prepare to remove class pair - impair */ /* Prepare to remove class pair - impair */
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre), .noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
.border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre) { div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre) {
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%); background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%); background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%); background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
@ -3115,7 +3115,7 @@ div.tabBar .noborder {
} }
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre), .noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
.border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre) div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre)
{ {
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%); background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%); background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);

View File

@ -2200,17 +2200,14 @@ 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:'').'"';
/*
$hookmanager->initHooks(array('userdao'));
$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;
*/
} }
/*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);
$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.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
@ -2240,11 +2237,6 @@ class User extends CommonObject
$result.=$companylink; $result.=$companylink;
global $action; 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')); $hookmanager->initHooks(array('userdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -835,17 +835,14 @@ class UserGroup extends CommonObject
} }
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; $linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
/*
$hookmanager->initHooks(array('groupdao'));
$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;
*/
} }
/*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);
$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 = '<a href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
@ -857,11 +854,6 @@ class UserGroup extends CommonObject
$result .= $linkend; $result .= $linkend;
global $action; 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')); $hookmanager->initHooks(array('groupdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks