Skip to content
Snippets Groups Projects
Commit 48543a0d authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: sorry it's ok

parent de20b6b7
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment