From: Nik Okuntseff Date: Sun, 28 Apr 2019 00:00:03 +0000 (+0000) Subject: Improved ttTimeHelper::holidayMatch to allow partial wildcards in year. X-Git-Tag: timetracker_1.19-1~32 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=42fb0e1b78c91f0aacbc3d9d707181445e33caf9;p=timetracker.git Improved ttTimeHelper::holidayMatch to allow partial wildcards in year. --- 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}