Fixed holidays display for subgroups.
[timetracker.git] / WEB-INF / lib / form / Calendar.class.php
index 4c835f6..a8455a8 100644 (file)
@@ -172,9 +172,8 @@ class Calendar extends FormElement {
             }
 
               // holidays
-              //if ($this->showHolidays) {
               global $user;
-              if ($user->show_holidays) {
+              if ($user->isOptionEnabled('show_holidays')) {
               foreach ($this->holidays as $day) {
                 if($day == $date) {
                   $stl_cell = ' class="CalendarDayHoliday"';
@@ -260,7 +259,7 @@ class Calendar extends FormElement {
     function _getActiveDates($start, $end) {
       
       global $user;
-      $user_id = $user->getActiveUser();
+      $user_id = $user->getUser();
       
       $table = ($this->highlight == 'expenses') ? 'tt_expense_items' : 'tt_log';