From 935482ee2228b54fd4d6bc7034fbe2b88fd1771e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 15 Feb 2022 19:04:18 +0100 Subject: [PATCH] uniformize --- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/asset/class/asset.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture-rec.class.php | 2 +- htdocs/compta/paiement/class/paiement.class.php | 2 +- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- htdocs/delivery/class/delivery.class.php | 2 +- htdocs/don/class/paymentdonation.class.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 2 +- htdocs/ecm/class/ecmfiles.class.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 2 +- htdocs/expensereport/class/paymentexpensereport.class.php | 2 +- htdocs/fichinter/class/fichinterrec.class.php | 2 +- htdocs/fourn/class/fournisseur.facture-rec.class.php | 2 +- htdocs/fourn/class/fournisseur.product.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/loan/class/loan.class.php | 2 +- htdocs/loan/class/paymentloan.class.php | 2 +- htdocs/reception/class/reception.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index e0d1ede11fd..ac943180b58 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -562,7 +562,7 @@ class AccountingAccount extends CommonObject $result .= $linkstart . $label_link . $linkend; } global $action; - $hookmanager->initHooks(array('accountingaccountdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 1d7ceeec860..58eeb2afd2b 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -513,7 +513,7 @@ class BookKeeping extends CommonObject //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); global $action; - $hookmanager->initHooks(array('bookkeepingdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index d07b785a474..916fb376526 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -307,7 +307,7 @@ class Asset extends CommonObject { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; - global $menumanager, $hookmanager; + global $menumanager; if (!empty($conf->dol_no_mouse_hover)) { $notooltip = 1; // Force disable tooltips diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f2efbac0b4e..6d05a052923 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3766,7 +3766,7 @@ class Commande extends CommonOrder global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 139f95c9463..ae264f7a813 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1442,7 +1442,7 @@ class FactureRec extends CommonInvoice $result .= $linkend; global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 9459d55741f..23230c4175d 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1211,7 +1211,7 @@ class Paiement extends CommonObject $result .= $linkend; global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 0c062f24e7a..caa04146264 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -627,7 +627,7 @@ class ChargeSociales extends CommonObject $result .= $linkend; global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index ccf197c7092..3241461ace1 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -759,7 +759,7 @@ class Delivery extends CommonObject $result .= $linkstart.$this->ref.$linkend; global $action; - $hookmanager->initHooks(array('deliverydao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index f1028146397..0f8db03597d 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -685,7 +685,7 @@ class PaymentDonation extends CommonObject } global $action; - $hookmanager->initHooks(array('paymentdonationdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 7381beb6fea..f99a567a314 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -507,7 +507,7 @@ class EcmDirectory extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('ecmdirectorydao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 9121ddacd0e..2f9bf4c41e5 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -870,7 +870,7 @@ class EcmFiles extends CommonObject $result .= $linkstart.$this->ref.$linkend; global $action; - $hookmanager->initHooks(array('ecmfilesdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 18126980d1b..be49b0a8c0c 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1710,7 +1710,7 @@ class ExpenseReport extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('expensereportdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 2b17f4f8603..5f9e9f17e6f 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -661,7 +661,7 @@ class PaymentExpenseReport extends CommonObject } } global $action; - $hookmanager->initHooks(array('paymentexpensereportdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 3653d84247d..fa97cf3e8a5 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -655,7 +655,7 @@ class FichinterRec extends Fichinter } global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 45871da689f..c8f0ad75536 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -1431,7 +1431,7 @@ class FactureFournisseurRec extends CommonInvoice $result .= $linkend; global $action; $hookmanager->initHooks(array($this->element . 'dao')); - $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 if ($reshook > 0) { $result = $hookmanager->resPrint; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index c289307c69f..cb9416e3da2 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -1228,7 +1228,7 @@ class ProductFournisseur extends Product //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); global $action; - $hookmanager->initHooks(array('supplierproductdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 822ddf2cbe4..75984c94f99 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -640,7 +640,7 @@ class PaiementFourn extends Paiement $result .= $linkend; global $action; - $hookmanager->initHooks(array('supplierpaymentdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 2530ffcecfe..7edaefb45b2 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -607,7 +607,7 @@ class Loan extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('loandao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index f998b3f1077..ae31a8314aa 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -655,7 +655,7 @@ class PaymentLoan extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('loanpaymentdao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 46e89a5ac4c..741ba107e89 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1150,7 +1150,7 @@ class Reception extends CommonObject $result .= $linkstart.$this->ref.$linkend; global $action; - $hookmanager->initHooks(array('receptiondao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index b6c8586ac61..8ea35d43c33 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -987,7 +987,7 @@ class Dolresource extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('dolresourcedao')); + $hookmanager->initHooks(array($this->element . 'dao')); $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) {