From 42fb0e1b78c91f0aacbc3d9d707181445e33caf9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 28 Apr 2019 00:00:03 +0000 Subject: [PATCH] Improved ttTimeHelper::holidayMatch to allow partial wildcards in year. --- WEB-INF/lib/ttTimeHelper.class.php | 6 ++++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 57790e22..f6d8b92d 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -65,8 +65,10 @@ class ttTimeHelper { $holiDateSpecArray = explode('-', $holiDateSpec); // Check year. - if ($dateArray[0] != $holiDateSpecArray[0] && $holiDateSpecArray[0] != '****') // **** means all years. - return false; + for($i = 0; $i < 4; $i++) { + if ($dateArray[0][$i] != $holiDateSpecArray[0][$i] && $holiDateSpecArray[0][$i] != '*') // * means any digit matches + return false; + } // Check month. if ($dateArray[1] != $holiDateSpecArray[1]) return false; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b303ed99..4b60ee5b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.19.4.4997 | Copyright © Anuko | +  Anuko Time Tracker 1.19.4.4998 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1