From 5b91ae062f47937338733a8cd7bae5f70adceeeb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Apr 2022 10:31:58 +0200 Subject: [PATCH] All triggers with a name XXX_UPDATE have been renamed XXX_MODIFY for code consistency purpose. --- ChangeLog | 6 +++--- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/facture/class/facture-rec.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 4 ++-- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/coreobject.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 4 ++-- htdocs/fichinter/class/fichinter.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 2 +- htdocs/fourn/class/fournisseur.facture-rec.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 4 ++-- htdocs/fourn/class/fournisseur.product.class.php | 2 +- htdocs/product/class/productcustomerprice.class.php | 2 +- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 +- 19 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3dd00815d51..e07a9f5ef29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,14 +21,14 @@ NEW: Experimental module Partnership Management For developers: --------------- -NEW: +NEW: A lot of addition of hooks. Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * verifCond('stringtoevaluate') now return false when string contains a bad syntax content instead of true. -* The deprecated mdethod thirdparty_doc_create() has been removed. You can use the generateDocument() instead. - +* The deprecated method thirdparty_doc_create() has been removed. You can use the generateDocument() instead. +* All triggers with a name XXX_UPDATE have been rename with name XXX_MODIFY for code consistency purpose. ***** ChangeLog for 15.0.1 compared to 15.0.0 ***** diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f3a54d8da27..a30fc456b18 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -4426,7 +4426,7 @@ class PropaleLigne extends CommonObjectLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINEPROPAL_UPDATE', $user); + $result = $this->call_trigger('LINEPROPAL_MODIFY', $user); if ($result < 0) { $this->db->rollback(); return -1; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 7ae4098e921..4c745948f52 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -4637,7 +4637,7 @@ class OrderLine extends CommonOrderLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINEORDER_UPDATE', $user); + $result = $this->call_trigger('LINEORDER_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index f6875521617..219d8bee154 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -866,7 +866,7 @@ class Account extends CommonObject if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('BANKACCOUNT_UPDATE', $user); + $result = $this->call_trigger('BANKACCOUNT_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index cdc75cac9e7..2bfb250df83 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -2176,7 +2176,7 @@ class FactureLigneRec extends CommonInvoiceLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINEBILLREC_UPDATE', $user); + $result = $this->call_trigger('LINEBILLREC_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3574eb8db2c..af029376d53 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5775,7 +5775,7 @@ class FactureLigne extends CommonInvoiceLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINEBILL_UPDATE', $user); + $result = $this->call_trigger('LINEBILL_MODIFY', $user); if ($result < 0) { $this->db->rollback(); return -2; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e5cafae2bb3..262876c312c 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1798,7 +1798,7 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger - $result = $this->call_trigger('LINECONTRACT_UPDATE', $user); + $result = $this->call_trigger('LINECONTRACT_MODIFY', $user); if ($result < 0) { $this->db->rollback(); return -3; @@ -3196,7 +3196,7 @@ class ContratLigne extends CommonObjectLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINECONTRACT_UPDATE', $user); + $result = $this->call_trigger('LINECONTRACT_MODIFY', $user); if ($result < 0) { $error++; $this->db->rollback(); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f9bbb9ed879..232aa6b5789 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4024,7 +4024,7 @@ abstract class CommonObject $this->context['link_source_type'] = $sourcetype; $this->context['link_target_id'] = $targetid; $this->context['link_target_type'] = $targettype; - $result = $this->call_trigger('OBJECT_LINK_UPDATE', $f_user); + $result = $this->call_trigger('OBJECT_LINK_MODIFY', $f_user); if ($result < 0) { $error++; } diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 91b176f899d..1bb4e92a0c9 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -245,7 +245,7 @@ class CoreObject extends CommonObject $res = $this->updateCommon($user); if ($res) { - $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); + $result = $this->call_trigger(strtoupper($this->element).'_MODIFY', $user); if ($result < 0) { $error++; } else { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index dca5d8f264e..3415dabc33d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -3031,7 +3031,7 @@ class ExpeditionLigne extends CommonObjectLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINESHIPPING_UPDATE', $user); + $result = $this->call_trigger('LINESHIPPING_MODIFY', $user); if ($result < 0) { $this->errors[] = $this->error; $error++; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 18fe225599b..0796e64703b 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -514,7 +514,7 @@ class ExpenseReport extends CommonObject if ($result) { if (!$notrigger) { // Call trigger - $result = $this->call_trigger('EXPENSE_REPORT_UPDATE', $user); + $result = $this->call_trigger('EXPENSE_REPORT_MODIFY', $user); if ($result < 0) { $error++; @@ -2159,7 +2159,7 @@ class ExpenseReport extends CommonObject if ($result > 0 && !$notrigger) { // Call triggers - $result = $this->call_trigger('EXPENSE_REPORT_DET_UPDATE', $user); + $result = $this->call_trigger('EXPENSE_REPORT_DET_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 512ae324fa3..fac008ec304 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1586,7 +1586,7 @@ class FichinterLigne extends CommonObjectLine if ($result > 0) { if (!$notrigger) { // Call trigger - $result = $this->call_trigger('LINEFICHINTER_UPDATE', $user); + $result = $this->call_trigger('LINEFICHINTER_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 16c37cdb0d0..327bfc867d9 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3895,7 +3895,7 @@ class CommandeFournisseurLigne extends CommonOrderLine if (!$error && !$notrigger) { global $user; // Call trigger - $result = $this->call_trigger('LINEORDER_SUPPLIER_UPDATE', $user); + $result = $this->call_trigger('LINEORDER_SUPPLIER_MODIFY', $user); if ($result < 0) { $this->db->rollback(); return -1; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 7037cd94262..2ed936ee1f6 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -410,7 +410,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine if (!$notrigger) { // Call triggers - $result = $this->call_trigger('LINERECEPTION_UPDATE', $user); + $result = $this->call_trigger('LINERECEPTION_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 4a6d6e292ca..9b1c2b8b374 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -2186,7 +2186,7 @@ class FactureFournisseurLigneRec extends CommonObjectLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINESUPPLIERBILLREC_UPDATE', $user); + $result = $this->call_trigger('LINESUPPLIERBILLREC_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 7a8faefbaaf..24561e08785 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1306,7 +1306,7 @@ class FactureFournisseur extends CommonInvoice if (!$error) { if (!$notrigger) { // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_UPDATE', $user); + $result = $this->call_trigger('BILL_SUPPLIER_MODIFY', $user); if ($result < 0) { $error++; } @@ -3704,7 +3704,7 @@ class SupplierInvoiceLine extends CommonObjectLine global $langs, $user; // Call trigger - if ($this->call_trigger('LINEBILL_SUPPLIER_UPDATE', $user) < 0) { + if ($this->call_trigger('LINEBILL_SUPPLIER_MODIFY', $user) < 0) { $this->db->rollback(); return -1; } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index e5851379f73..396995c4c86 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -414,7 +414,7 @@ class ProductFournisseur extends Product $resql = $this->db->query($sql); if ($resql) { // Call trigger - $result = $this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE', $user); + $result = $this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 1c91c3804d2..20242d4f2a9 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -766,7 +766,7 @@ class Productcustomerprice extends CommonObject if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_UPDATE', $user); + $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 4a055b5afa4..168a0f8d4ee 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -3282,7 +3282,7 @@ class SupplierProposalLine extends CommonObjectLine if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('LINESUPPLIER_PROPOSAL_UPDATE', $user); + $result = $this->call_trigger('LINESUPPLIER_PROPOSAL_MODIFY', $user); if ($result < 0) { $this->db->rollback(); return -1;