diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6bc8a6a4ff5..f4c9076fbd9 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -102,6 +102,7 @@ class DolibarrApi unset($object->isextrafieldmanaged); unset($object->ismultientitymanaged); unset($object->restrictiononfksoc); + unset($object->table_rowid); // Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses unset($object->linkedObjects); @@ -149,6 +150,10 @@ class DolibarrApi unset($object->context); unset($object->next_prev_filter); + if ($object->table_element != 'ticket') { + unset($object->comments); + } + // Remove the $oldcopy property because it is not supported by the JSON // encoder. The following error is generated when trying to serialize // it: "Error encoding/decoding JSON: Type is not supported" diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 652e0d80966..f3fa2cd47c1 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -338,6 +338,7 @@ class AgendaEvents extends DolibarrApi // phpcs:enable $object = parent::_cleanObjectDatas($object); + unset($object->note); // alreaydy into note_private unset($object->usermod); unset($object->libelle); unset($object->context); @@ -350,6 +351,11 @@ class AgendaEvents extends DolibarrApi unset($object->origin_id); unset($object->ref_ext); unset($object->statut); + unset($object->state_code); + unset($object->state_id); + unset($object->state); + unset($object->region); + unset($object->region_code); unset($object->country); unset($object->country_id); unset($object->country_code); @@ -378,6 +384,9 @@ class AgendaEvents extends DolibarrApi unset($object->contact); unset($object->societe); + unset($object->actions); + unset($object->lines); + return $object; } }