Clean APIs
This commit is contained in:
parent
b958997268
commit
93f3b1d2db
@ -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"
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user