Merge pull request #15256 from frederic34/patch-8
Update fichinter.class.php
This commit is contained in:
commit
dab76b4c19
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015-2020 Charlene Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2015-2020 Charlene Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -635,10 +635,6 @@ class Fichinter extends CommonObject
|
|||||||
$this->statut = 1;
|
$this->statut = 1;
|
||||||
$this->brouillon = 0;
|
$this->brouillon = 0;
|
||||||
$this->date_validation = $now;
|
$this->date_validation = $now;
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error)
|
|
||||||
{
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
@ -970,14 +966,13 @@ class Fichinter extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error) {
|
||||||
{
|
$main = MAIN_DB_PREFIX.'fichinterdet';
|
||||||
$main = MAIN_DB_PREFIX.'fichinterdet';
|
$ef = $main."_extrafields";
|
||||||
$ef = $main."_extrafields";
|
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = ".$this->id.")";
|
||||||
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = ".$this->id.")";
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) $error++;
|
if (!$resql) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user