diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index c064c74b0acb8370a8efef5ca9569b64f585e5c8..d937b34536f1a2fb00bc32b19c1e451b12a9a913 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.fr> * * 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 diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e3fda63ef94e279f59da43de121800859376fae7..202a3dc2a0d34ca3736aaa09a81759ac7dcb8c49 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1151,6 +1151,16 @@ class Contrat extends CommonObject } } + // Removed extrafields + if (! $error) { + $result=$this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); + } + } + if (! $error) { // We remove directory diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php index 332a7d0547e5323b82759c881e0875541de4b51f..7466c66df08a5b1eeb1984f698b4fb65f2ee07df 100644 --- a/htdocs/core/extrafieldsinexport.inc.php +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -1,4 +1,4 @@ -<?php +<?php if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index f1ae7af5309f04ec302b33bf55d9964c56219680..a320c4ff7c72f28b147de606823fa75c2f33f271 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1348,7 +1348,7 @@ class FichinterLigne extends CommonObjectLine // Mise a jour ligne en base $sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET"; $sql.= " description='".$this->db->escape($this->desc)."'"; - $sql.= ",date=".$this->db->idate($this->datei); + $sql.= ",date='".$this->db->idate($this->datei)."'"; $sql.= ",duree=".$this->duration; $sql.= ",rang='".$this->rang."'"; $sql.= " WHERE rowid = ".$this->rowid;