FIX: #14474 Error when deleting

This commit is contained in:
Juanjo Menent
2020-09-03 12:43:38 +02:00
parent 162da37f1a
commit bb92e64e43
9 changed files with 100 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
@@ -1003,6 +1003,12 @@ class Fichinter extends CommonObject
if (! $error)
{
// On delete ecm_files database info
if (!$this->delete_ecmfiles()) {
$this->db->rollback();
return 0;
}
// Remove directory with files
$fichinterref = dol_sanitizeFileName($this->ref);
if ($conf->ficheinter->dir_output)