diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 01f38eb531f..41cdd5caf5c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -791,16 +791,16 @@ class ActionComm extends CommonObject */ public function fetchResources() { - $sql = 'SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency'; + $this->userassigned = array(); + $this->socpeopleassigned = array(); + + $sql = 'SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency'; $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm_resources'; $sql .= ' WHERE fk_actioncomm = '.$this->id; $sql .= " AND element_type IN ('user', 'socpeople')"; $resql = $this->db->query($sql); if ($resql) { - $this->userassigned = array(); - $this->socpeopleassigned = array(); - // If owner is known, we must but id first into list if ($this->userownerid > 0) $this->userassigned[$this->userownerid] = array('id'=>$this->userownerid); // Set first so will be first into list. diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 8288db9d90b..6df7aaa55ba 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -554,7 +554,10 @@ if ($resql) $actionstatic->type_picto = $obj->type_picto; $actionstatic->label = $obj->label; $actionstatic->location = $obj->location; - $actionstatic->note = dol_htmlentitiesbr($obj->note); + $actionstatic->note = dol_htmlentitiesbr($obj->note); // deprecated + $actionstatic->note_public = dol_htmlentitiesbr($obj->note); + + $actionstatic->fetchResources(); print ''; @@ -656,7 +659,6 @@ if ($resql) if (!empty($arrayfields['a.fk_contact']['checked'])) { print ''; - $actionstatic->fetchResources(); if (!empty($actionstatic->socpeopleassigned)) { $contactList = array();