Merge pull request #22800 from frederic34/ecmfilesextrafieldsdelete
delete extrafields when deleting ecmfiles
This commit is contained in:
commit
b19bb4447a
@ -751,7 +751,13 @@ class EcmFiles extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If you need to delete child tables to, you can insert them here
|
// If you need to delete child tables to, you can insert them here
|
||||||
|
if (!$error) {
|
||||||
|
$result = $this->deleteExtraFields();
|
||||||
|
if (!$result) {
|
||||||
|
dol_syslog(get_class($this)."::delete error ".$this->error, LOG_ERR);
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
|
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user