A bit of refactoring.
[timetracker.git] / WEB-INF / lib / form / Calendar.class.php
index 1340c98..4c835f6 100644 (file)
@@ -172,7 +172,9 @@ class Calendar extends FormElement {
             }
 
               // holidays
-              if ($this->showHolidays) {
+              //if ($this->showHolidays) {
+              global $user;
+              if ($user->show_holidays) {
               foreach ($this->holidays as $day) {
                 if($day == $date) {
                   $stl_cell = ' class="CalendarDayHoliday"';
@@ -205,7 +207,7 @@ class Calendar extends FormElement {
         $str .= "</TR>\n";
       }
 
-      $str .= "<tr><td colspan=\"7\" align=\"center\"><a id=\"today_link\" href=\"?".$this->controlName."=".strftime(DB_DATEFORMAT)."\" tabindex=\"-1\">".$i18n->getKey('label.today')."</a></td></tr>\n";
+      $str .= "<tr><td colspan=\"7\" align=\"center\"><a id=\"today_link\" href=\"?".$this->controlName."=".strftime(DB_DATEFORMAT)."\" tabindex=\"-1\">".$i18n->get('label.today')."</a></td></tr>\n";
       $str .= "</table>\n";
 
       $str .= "<input type=\"hidden\" name=\"$this->controlName\" value=\"$indate\">\n";