Browse Source

Clean api from bad vars

Laurent Destailleur 5 years ago
parent
commit
1cc9954f61
2 changed files with 9 additions and 0 deletions
  1. 1 0
      htdocs/api/class/api.class.php
  2. 8 0
      htdocs/societe/class/api_thirdparties.class.php

+ 1 - 0
htdocs/api/class/api.class.php

@@ -146,6 +146,7 @@ class DolibarrApi
 
         unset($object->skip_update_total);
         unset($object->context);
+        unset($object->next_prev_filter);
 
         // Remove the $oldcopy property because it is not supported by the JSON
         // encoder. The following error is generated when trying to serialize

+ 8 - 0
htdocs/societe/class/api_thirdparties.class.php

@@ -1676,6 +1676,12 @@ class Thirdparties extends DolibarrApi
 		$object = parent::_cleanObjectDatas($object);
 
 		unset($object->nom);	// ->name already defined and nom deprecated
+		unset($object->name_bis);	// ->name_alias already defined
+		unset($object->note);	// ->note_private and note_public already defined
+		unset($object->departement);
+		unset($object->departement_code);
+		unset($object->pays);
+		unset($object->particulier);
 
 		unset($object->total_ht);
 		unset($object->total_tva);
@@ -1686,6 +1692,8 @@ class Thirdparties extends DolibarrApi
 		unset($object->lines);
 		unset($object->thirdparty);
 
+		unset($object->fk_delivery_address);	// deprecated feature
+
 		return $object;
 	}