From 809d98129f5640ead0c2ee3601c66d66d5c13bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:14:45 +0200 Subject: [PATCH] Update api_thirdparties.class.php --- htdocs/societe/class/api_thirdparties.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 3d2104cc6f2..adcde4b0d5e 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -418,7 +418,7 @@ class Thirdparties extends DolibarrApi // External modules should update their ones too if (!$errors) { -$reshook = $hookmanager->executeHooks('replaceThirdparty', array( + $reshook = $hookmanager->executeHooks('replaceThirdparty', array( 'soc_origin' => $soc_origin->id, 'soc_dest' => $object->id ), $soc_dest, $action); @@ -488,6 +488,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->company->oldcopy = $this->company; return $this->company->delete($id); }