From f9dbe91c3f77de3949e97c4b33a89ea9ae31c64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:38:42 +0100 Subject: [PATCH] Update api_holidays.class.php --- htdocs/holiday/class/api_holidays.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/holiday/class/api_holidays.class.php b/htdocs/holiday/class/api_holidays.class.php index 40d4fa97956..b172c36bcbc 100644 --- a/htdocs/holiday/class/api_holidays.class.php +++ b/htdocs/holiday/class/api_holidays.class.php @@ -365,7 +365,7 @@ class Holidays extends DolibarrApi if (!DolibarrApi::_checkAccessToResource('holiday', $this->holiday->id)) { throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - + $this->holiday->status = Holiday::STATUS_VALIDATED; $result = $this->holiday->validate(DolibarrApiAccess::$user, $notrigger); if ($result == 0) { @@ -448,7 +448,7 @@ class Holidays extends DolibarrApi if (!DolibarrApiAccess::$user->hasRight('holiday', 'write')) { throw new RestException(403, "Insufficient rights"); } - + $result = $this->holiday->fetch($id); if (!$result) { throw new RestException(404, 'Holiday not found'); @@ -495,7 +495,7 @@ class Holidays extends DolibarrApi if (!DolibarrApiAccess::$user->hasRight('holiday', 'approve')) { throw new RestException(403, "Insufficient rights"); } - + $result = $this->holiday->fetch($id); if (!$result) { throw new RestException(404, 'Holiday not found'); @@ -545,7 +545,7 @@ class Holidays extends DolibarrApi if (!DolibarrApiAccess::$user->hasRight('holiday', 'write')) { throw new RestException(403, "Insufficient rights"); } - + $result = $this->holiday->fetch($id); if (!$result) { throw new RestException(404, 'Holiday not found');