Update actioncomm.class.php
This commit is contained in:
parent
88f18ec3ce
commit
fe4cd2e7bc
@ -898,13 +898,14 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// remove categorie association
|
// remove categorie association
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_actioncomm";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_actioncomm";
|
||||||
$sql .= " WHERE fk_actioncomm=".$this->id;
|
$sql .= " WHERE fk_actioncomm=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete categorie", LOG_DEBUG);
|
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res < 0) {
|
if ($res < 0) {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
@ -915,7 +916,6 @@ class ActionComm extends CommonObject
|
|||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
|
||||||
$sql .= " WHERE id=".$this->id;
|
$sql .= " WHERE id=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res < 0) {
|
if ($res < 0) {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
@ -927,7 +927,6 @@ class ActionComm extends CommonObject
|
|||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
||||||
$sql .= " WHERE fk_actioncomm=".$this->id;
|
$sql .= " WHERE fk_actioncomm=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res < 0) {
|
if ($res < 0) {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user