Log
This commit is contained in:
parent
98b8c81104
commit
983a530251
@ -703,13 +703,14 @@ class Categorie extends CommonObject
|
||||
$type = $obj->element;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this).'::add_type', LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]);
|
||||
$sql .= " (fk_categorie, fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type]).")";
|
||||
$sql .= " VALUES (".((int) $this->id).", ".((int) $obj->id).")";
|
||||
|
||||
dol_syslog(get_class($this).'::add_type', LOG_DEBUG);
|
||||
if ($this->db->query($sql)) {
|
||||
if (!empty($conf->global->CATEGORIE_RECURSIV_ADD)) {
|
||||
$sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'categorie';
|
||||
|
||||
@ -9954,7 +9954,7 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
return $error ? -1 * $error : $ok;
|
||||
return $error ? (-1 * $error) : $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user