diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 0d501e63cdc..dfd78b08cd6 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1,10 +1,10 @@ - * Copyright (C) 2018 Pierre Chéné - * Copyright (C) 2019 Cedric Ancelin - * Copyright (C) 2020-2024 Frédéric France - * Copyright (C) 2023 Alexandre Janniaux - * Copyright (C) 2024 MDW +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2018 Pierre Chéné + * Copyright (C) 2019 Cedric Ancelin + * Copyright (C) 2020-2024 Frédéric France + * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ class Thirdparties extends DolibarrApi */ public function __construct() { - global $db, $conf; + global $db; $this->db = $db; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -258,7 +258,7 @@ class Thirdparties extends DolibarrApi continue; } - $this->company->$field = $value; + $this->company->$field = $this->_checkValForAPI($field, $value, $this->company); } if ($this->company->create(DolibarrApiAccess::$user) < 0) { @@ -303,7 +303,7 @@ class Thirdparties extends DolibarrApi continue; } - $this->company->$field = $value; + $this->company->$field = $this->_checkValForAPI($field, $value, $this->company); } if (isModEnabled('mailing') && !empty($this->company->email) && isset($this->company->no_email)) {