]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttTimeHelper.class.php
Made show_holidays configurable as per issue #53.
[timetracker.git] / WEB-INF / lib / ttTimeHelper.class.php
index 6b1efe0dbc67e3c5875ce6964bf306d4a1ce734d..f5c3e93824376a55e61de02de5aaed3338c09faa 100644 (file)
@@ -39,7 +39,11 @@ class ttTimeHelper {
 
   // isHoliday determines if $date falls on a holiday.
   static function isHoliday($date) {
+    global $user;
     global $i18n;
+
+    if (!$user->show_holidays) return false;
+
     // $date is expected as string in DB_DATEFORMAT.
     $month = date('m', strtotime($date));
     $day = date('d', strtotime($date));