Clean api rest

This commit is contained in:
Laurent Destailleur 2016-12-10 19:04:56 +01:00
parent ce41c84c95
commit cdba7cfa1c
2 changed files with 16 additions and 1 deletions

View File

@ -4,7 +4,7 @@ ACCOUNTING_EXPORT_DATE=Format de date pour le fichier d'exportation
ACCOUNTING_EXPORT_PIECE=Exporter la référence de la pièce ?
ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Exporter avec les lignes regroupées ?
ACCOUNTING_EXPORT_LABEL=Exporter le libellé
ACCOUNTING_EXPORT_AMOUNT=Exporter le montant
ACCOUNTING_EXP ORT_AMOUNT=Exporter le montant
ACCOUNTING_EXPORT_DEVISE=Exporter la devise
Selectformat=Sélectionnez le format du fichier
ACCOUNTING_EXPORT_PREFIX_SPEC=Spécifiez le préfixe pour le nom du fichier

View File

@ -268,6 +268,21 @@ class Products extends DolibarrApi
return $categories->getListForItem('product', $sortfield, $sortorder, $limit, $page, $id);
}
/**
* Clean sensible object datas
*
* @param object $object Object to clean
* @return array Array of cleaned object properties
*/
function _cleanObjectDatas($object) {
$object = parent::_cleanObjectDatas($object);
unset($object->regeximgext);
return $object;
}
/**
* Validate fields before create or update object
*