From 9b10de3a8c9847704cdeead048b31725372e4d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 31 Oct 2020 09:22:02 +0100 Subject: [PATCH] Update api_boms.class.php public function update(User $user, $notrigger = false) --- htdocs/bom/class/api_boms.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index 3509d8195d0..d0e2e12ec0c 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2019 Maxime Kohlhaas + * Copyright (C) 2020 Frédéric France * * 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 @@ -131,8 +132,7 @@ class Boms extends DolibarrApi } if ($sqlfilters) { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -224,8 +224,7 @@ class Boms extends DolibarrApi $this->bom->$field = $value; } - if ($this->bom->update($id, DolibarrApiAccess::$user) > 0) - { + if ($this->bom->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->bom->error);