From 5169437c2d921f9032536f2c5abf8cc944406493 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Apr 2012 18:51:42 +0200 Subject: [PATCH] Fix: commit at wrong place --- htdocs/projet/class/task.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index eb29f89f2d5..66f6433067b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -368,16 +368,14 @@ class Task extends CommonObject } else { - $this->db->commit(); - $this->db->free($resql); - + //Delete associated link file if ($conf->projet->dir_output) { $projectstatic=new Project($this->db); $projectstatic->fetch($this->fk_project); - + $dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($projectstatic->ref) . '/' . dol_sanitizeFileName($this->id); dol_syslog(get_class($this)."::delete dir=".$dir, LOG_DEBUG); if (file_exists($dir)) @@ -392,8 +390,10 @@ class Task extends CommonObject } } } - - return 1; + + $this->db->commit(); + + return 1; } }