Fix loading of project

This commit is contained in:
Laurent Destailleur 2015-06-03 18:24:09 +02:00
parent c57693a245
commit 995645800e

View File

@ -759,10 +759,14 @@ abstract class CommonObject
*/
function fetch_projet()
{
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
if (empty($this->fk_project) && ! empty($this->fk_projet)) $this->fk_project = $this->fk_projet; // For backward compatibility
if (empty($this->fk_project)) return 0;
$project = new Project($this->db);
$result = $project->fetch($this->fk_project);
$this->projet = $project; // deprecated
$this->project = $project;
return $result;