Skip to content
Snippets Groups Projects
Commit 99564580 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix loading of project

parent c57693a2
No related branches found
No related tags found
No related merge requests found
...@@ -759,10 +759,14 @@ abstract class CommonObject ...@@ -759,10 +759,14 @@ abstract class CommonObject
*/ */
function fetch_projet() 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; if (empty($this->fk_project)) return 0;
$project = new Project($this->db); $project = new Project($this->db);
$result = $project->fetch($this->fk_project); $result = $project->fetch($this->fk_project);
$this->projet = $project; // deprecated $this->projet = $project; // deprecated
$this->project = $project; $this->project = $project;
return $result; return $result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment