FIX Remane of project

This commit is contained in:
Laurent Destailleur 2019-03-26 12:35:44 +01:00
parent 3ede626932
commit e5f54bd14c

View File

@ -338,7 +338,7 @@ class Project extends CommonObject
if (file_exists($olddir)) if (file_exists($olddir))
{ {
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
$res=dol_move($olddir, $newdir); $res=@rename($olddir, $newdir);
if (! $res) if (! $res)
{ {
$langs->load("errors"); $langs->load("errors");
@ -723,10 +723,10 @@ class Project extends CommonObject
return -1; return -1;
} }
} }
/** /**
* Delete tasks with no children first, then task with children recursively * Delete tasks with no children first, then task with children recursively
* *
* @param User $user User * @param User $user User
* @return int <0 if KO, 1 if OK * @return int <0 if KO, 1 if OK
*/ */
@ -754,7 +754,7 @@ class Project extends CommonObject
{ {
if (count($this->lines)) $this->deleteTasks($this->lines); if (count($this->lines)) $this->deleteTasks($this->lines);
} }
return 1; return 1;
} }