diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 18a91efaacd..cafc9338ae8 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -271,7 +271,7 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { // Call trigger - $result = $this->call_trigger('ADHERENT_TYPE_DEL_MULTILANGS', $user); + $result = $this->call_trigger('MEMBER_TYPE_DEL_MULTILANGS', $user); if ($result < 0) { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 6419e2b8970..6996c689922 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -364,7 +364,7 @@ class ChargeSociales extends CommonObject if (!$error) { if (!$notrigger) { // Call trigger - $result = $this->call_trigger('SOCIALCHARGES_MODIFY', $user); + $result = $this->call_trigger('SOCIALCONTRIBUTION_MODIFY', $user); if ($result < 0) { $error++; } diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 32fe3164ad8..4a4e5c3d2cb 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -127,12 +127,12 @@ class Ctyperesource if (!$error) { $this->id = $this->db->last_insert_id($this->db->prefix().$this->table_element); - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change CTYPERESOURCE to your own tag if you // want this action to call a trigger. //if (!$notrigger) { // // Call triggers - // $result=$this->call_trigger('MYOBJECT_CREATE',$user); + // $result=$this->call_trigger('CTYPERESOURCE_CREATE',$user); // if ($result < 0) $error++; // // End call triggers //} @@ -325,12 +325,12 @@ class Ctyperesource dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); } - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change CTYPERESOURCE to your own tag if you // want this action calls a trigger. //if (!$error && !$notrigger) { // // Call triggers - // $result=$this->call_trigger('MYOBJECT_MODIFY',$user); + // $result=$this->call_trigger('CTYPERESOURCE_MODIFY',$user); // if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} // // End call triggers //} @@ -363,12 +363,12 @@ class Ctyperesource $this->db->begin(); - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change CTYPERESOURCE to your own tag if you // want this action calls a trigger. //if (!$error && !$notrigger) { // // Call triggers - // $result=$this->call_trigger('MYOBJECT_DELETE',$user); + // $result=$this->call_trigger('CTYPERESOURCE_DELETE',$user); // if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} // // End call triggers //} diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 0796e64703b..1ed0e7a30f5 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1093,7 +1093,7 @@ class ExpenseReport extends CommonObject if (!$notrigger) { // Call trigger - $result = $this->call_trigger('EXPENSEREPORT_DELETE', $user); + $result = $this->call_trigger('EXPENSE_REPORT_DELETE', $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 9b1c2b8b374..d254068aff6 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -2008,7 +2008,7 @@ class FactureFournisseurLigneRec extends CommonObjectLine if (! $error) { if (! $notrigger) { // Call triggers - $result = $this->call_trigger('LINEBILLREC_DELETE', $user); + $result = $this->call_trigger('LINESUPPLIERBILLREC_DELETE', $user); if ($result < 0) { $error++; } // Do also here what you must do to rollback action if trigger fail diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 255908726d4..b698c6bf532 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -105,17 +105,6 @@ class PriceExpression if (!$error) { $this->id = $this->db->last_insert_id($this->db->prefix().$this->table_element); - - //if (! $notrigger) - //{ - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_CREATE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - //} } // Commit or rollback @@ -267,20 +256,6 @@ class PriceExpression $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - // if (! $error) - // { - // if (! $notrigger) - // { - // // Uncomment this and change MYOBJECT to your own tag if you - // // want this action calls a trigger. - - // //// Call triggers - // //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); - // //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - // //// End call triggers - // } - // } - // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) { @@ -311,20 +286,6 @@ class PriceExpression $this->db->begin(); - //if (! $error) - //{ - // if (! $notrigger) - // { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - // } - //} - if (!$error) { $sql = "DELETE FROM ".$this->db->prefix().$this->table_element; $sql .= " WHERE rowid = ".((int) $rowid); diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index fdb82800067..0e0f8883f99 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -468,11 +468,11 @@ class Productlot extends CommonObject //if (!$error) { //if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change PRODUCTLOT to your own tag if you // want this action calls a trigger. //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); + //$result=$this->call_trigger('PRODUCTLOT_DELETE',$user); //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} //// End call triggers //} diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 171755f867b..1f4d2920914 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -173,7 +173,7 @@ class Salary extends CommonObject if (!$notrigger) { // Call trigger - $result = $this->call_trigger('salary_MODIFY', $user); + $result = $this->call_trigger('SALARY_MODIFY', $user); if ($result < 0) $error++; // End call triggers } @@ -278,7 +278,7 @@ class Salary extends CommonObject $error = 0; // Call trigger - $result = $this->call_trigger('salary_DELETE', $user); + $result = $this->call_trigger('SALARY_DELETE', $user); if ($result < 0) return -1; // End call triggers @@ -438,7 +438,7 @@ class Salary extends CommonObject } // Call trigger - $result = $this->call_trigger('salary_CREATE', $user); + $result = $this->call_trigger('SALARY_CREATE', $user); if ($result < 0) $error++; // End call triggers } else $error++; diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index cfaab7f3768..aa0dd68ec19 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -551,7 +551,7 @@ class CTicketCategory extends CommonObject if (!$error && !$notrigger) { // Call trigger - $result = $this->call_trigger('MYOBJECT_VALIDATE', $user); + $result = $this->call_trigger('CTICKETCATEGORY_VALIDATE', $user); if ($result < 0) { $error++; } diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 80a48048151..50272789948 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -256,12 +256,12 @@ class Website extends CommonObject } } - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change WEBSITE to your own tag if you // want this action to call a trigger. // if (!$notrigger) { // // Call triggers - // $result = $this->call_trigger('MYOBJECT_CREATE',$user); + // $result = $this->call_trigger('WEBSITE_CREATE',$user); // if ($result < 0) $error++; // // End call triggers // } @@ -560,7 +560,7 @@ class Website extends CommonObject } //// Call triggers - //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); + //$result=$this->call_trigger('WEBSITE_MODIFY',$user); //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} //// End call triggers } @@ -595,11 +595,11 @@ class Website extends CommonObject if (!$error) { if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you + // Uncomment this and change WEBSITE to your own tag if you // want this action calls a trigger. //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); + //$result=$this->call_trigger('WEBSITE_DELETE',$user); //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} //// End call triggers }