Merge pull request #9444 from frederic34/patch-11
Completely comment unused code
This commit is contained in:
commit
b5d866f4d5
@ -335,18 +335,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
|
||||||
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action to call a trigger.
|
// want this action to call a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -566,15 +563,15 @@ class BookKeeping extends CommonObject
|
|||||||
if (! $error) {
|
if (! $error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
||||||
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action to call a trigger.
|
// want this action to call a trigger.
|
||||||
|
//if (! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -1131,15 +1128,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error && ! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -1205,17 +1202,15 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (! $error) {
|
|
||||||
if (! $notrigger) {
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user