From 38f14315344f42c231375ccb3c679839b42cdfc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Nov 2020 19:00:06 +0100 Subject: [PATCH] HOLIDAY_HIDE_FOR_NON_SALARIES replaces !HOLIDAY_FOR_NON_SALARIES_TOO --- htdocs/core/lib/date.lib.php | 2 +- htdocs/holiday/card.php | 4 ++-- htdocs/holiday/list.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 284bcffe4bb..cbfaa883da7 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -619,7 +619,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $specialdayrule = array(); // Check to ensure we use correct parameters - if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates'; + if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'Error Dates must use same hours and must be GMT dates'; if (empty($country_code)) $country_code = $mysoc->country_code; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 5cd43424760..2f2c9145beb 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -55,8 +55,8 @@ $now = dol_now(); $childids = $user->getAllChildIds(1); -$morefilter = 'AND employee = 1'; -if (!empty($conf->global->HOLIDAY_FOR_NON_SALARIES_TOO)) $morefilter = ''; +$morefilter = ''; +if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) $morefilter = 'AND employee = 1'; $error = 0; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index f16375209e1..615ab6cfa44 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -487,8 +487,8 @@ if ($resql) if (!empty($arrayfields['cp.fk_user']['checked'])) { - $morefilter = 'AND employee = 1'; - if (!empty($conf->global->HOLIDAY_FOR_NON_SALARIES_TOO)) $morefilter = ''; + $morefilter = ''; + if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) $morefilter = 'AND employee = 1'; // User $disabled = 0;