From f9b2f29547172644783a33b8c2eb4b3a50a9fbb9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 15 Apr 2012 18:33:14 +0200 Subject: [PATCH] Fix: sorry it's ok --- htdocs/projet/class/project.class.php | 6 +++--- htdocs/projet/class/task.class.php | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index a2ba7b5878b..503d4320fac 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -56,10 +56,10 @@ class Project extends CommonObject * * @param DoliDB $DB Database handler */ - function Project($DB) + function __construct($db) { - $this->db = $DB; - $this->societe = new Societe($DB); + $this->db = $db; + $this->societe = new Societe($db); $this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed'); $this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed'); diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index ffea9eaaf9f..eb29f89f2d5 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -66,10 +66,9 @@ class Task extends CommonObject * * @param DoliDB $DB Database handler */ - function Task($DB) + function __construct($db) { - $this->db = $DB; - return 1; + $this->db = $db; } @@ -374,15 +373,13 @@ class Task extends CommonObject $this->db->free($resql); //Delete associated link file - // TODO you can not delete project document folder in delete task method - /* 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(retreive proj ref) dir=".$dir, LOG_DEBUG); + dol_syslog(get_class($this)."::delete dir=".$dir, LOG_DEBUG); if (file_exists($dir)) { require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"); @@ -395,7 +392,6 @@ class Task extends CommonObject } } } - */ return 1; }