Clean some trigger names
This commit is contained in:
parent
7e34ce7245
commit
e2a957c738
@ -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);
|
||||
|
||||
@ -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++;
|
||||
}
|
||||
|
||||
@ -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
|
||||
//}
|
||||
|
||||
@ -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++;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
//}
|
||||
|
||||
@ -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++;
|
||||
|
||||
@ -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++;
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user