diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 07db3b5a5d8..2caff8d242c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -251,9 +251,6 @@ class ActionComm extends CommonObject public function __construct(DoliDB $db) { $this->db = $db; - - $this->societe = new stdClass(); // deprecated - $this->contact = new stdClass(); // deprecated } /** @@ -307,8 +304,6 @@ class ActionComm extends CommonObject $this->userassigned[$tmpid]=array('id'=>$tmpid, 'transparency'=>$this->transparency); } - //if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated - $userownerid=$this->userownerid; $userdoneid=$this->userdoneid; @@ -678,7 +673,7 @@ class ActionComm extends CommonObject $this->contactid = $obj->fk_contact; // To have fetch_contact method working $this->fk_project = $obj->fk_project; // To have fetch_project method working - $this->societe->id = $obj->fk_soc; // deprecated + //$this->societe->id = $obj->fk_soc; // deprecated //$this->contact->id = $obj->fk_contact; // deprecated $this->fk_element = $obj->elementid; @@ -889,8 +884,8 @@ class ActionComm extends CommonObject return -1; } - $socid=($this->socid?$this->socid:((isset($this->societe->id) && $this->societe->id > 0) ? $this->societe->id : 0)); - $contactid=($this->contactid?$this->contactid:0); + $socid=(($this->socid > 0)?$this->socid:0); + $contactid=(($this->contactid > 0)?$this->contactid:0); $userownerid=($this->userownerid?$this->userownerid:0); $userdoneid=($this->userdoneid?$this->userdoneid:0); diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 1ffbb6d9c52..0c26718f529 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -899,8 +899,6 @@ class InterfaceActionsAuto extends DolibarrTriggers $actioncomm->durationp = 0; $actioncomm->punctual = 1; $actioncomm->percentage = -1; // Not applicable - $actioncomm->societe = $societeforaction; - $actioncomm->contact = $contactforaction; $actioncomm->socid = $societeforaction->id; $actioncomm->contactid = $contactforaction->id; $actioncomm->authorid = $user->id; // User saving action