From 9d89e48d154276396e0dcd1c217cfa59577ac7df Mon Sep 17 00:00:00 2001 From: Julien Gainza Date: Mon, 6 Sep 2021 15:55:33 +0200 Subject: [PATCH 1/2] Fix : Add extrafields on API "get events list" --- htdocs/comm/action/class/api_agendaevents.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index d9feb4472b6..bf35ed95be0 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -171,6 +171,7 @@ class AgendaEvents extends DolibarrApi $obj = $db->fetch_object($result); $actioncomm_static = new ActionComm($db); if ($actioncomm_static->fetch($obj->rowid)) { + $actioncomm_static->fetch_optionals(); $obj_ret[] = $this->_cleanObjectDatas($actioncomm_static); } $i++; From 65c4a2189860f8176955db309531fa75aea55e4c Mon Sep 17 00:00:00 2001 From: Julien Gainza Date: Mon, 13 Sep 2021 16:35:13 +0200 Subject: [PATCH 2/2] FIX move fetch_optionnal into $ac_static->fetch() --- htdocs/comm/action/class/actioncomm.class.php | 1 + htdocs/comm/action/class/api_agendaevents.class.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 9e562173b04..a6252ecebe3 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -763,6 +763,7 @@ class ActionComm extends CommonObject $this->elementid = $obj->elementid; $this->elementtype = $obj->elementtype; + $this->fetch_optionals(); $this->fetchResources(); } $this->db->free($resql); diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index bf35ed95be0..d9feb4472b6 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -171,7 +171,6 @@ class AgendaEvents extends DolibarrApi $obj = $db->fetch_object($result); $actioncomm_static = new ActionComm($db); if ($actioncomm_static->fetch($obj->rowid)) { - $actioncomm_static->fetch_optionals(); $obj_ret[] = $this->_cleanObjectDatas($actioncomm_static); } $i++;