Fix: sorry it's ok
This commit is contained in:
parent
de20b6b70e
commit
48543a0d2f
@ -56,10 +56,10 @@ class Project extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Project($DB)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $db;
|
||||||
$this->societe = new Societe($DB);
|
$this->societe = new Societe($db);
|
||||||
|
|
||||||
$this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed');
|
$this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed');
|
||||||
$this->statuts = 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
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Task($DB)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $db;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -374,15 +373,13 @@ class Task extends CommonObject
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
//Delete associated link file
|
//Delete associated link file
|
||||||
// TODO you can not delete project document folder in delete task method
|
|
||||||
/*
|
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
$projectstatic=new Project($this->db);
|
$projectstatic=new Project($this->db);
|
||||||
$projectstatic->fetch($this->fk_project);
|
$projectstatic->fetch($this->fk_project);
|
||||||
|
|
||||||
$dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($projectstatic->ref) . '/' . dol_sanitizeFileName($this->id);
|
$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))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php");
|
||||||
@ -395,7 +392,6 @@ class Task extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user