diff options
Diffstat (limited to 'system/libraries/Calendar.php')
-rw-r--r-- | system/libraries/Calendar.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index 753033a34..969a7610a 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -205,7 +205,7 @@ class CI_Calendar { $cur_month = date('m', $this->local_time); $cur_day = date('j', $this->local_time); - $is_current_month = ($cur_year === $year && $cur_month === $month); + $is_current_month = ($cur_year == $year && $cur_month == $month); // Generate the template data array $this->parse_template(); @@ -258,21 +258,21 @@ class CI_Calendar { for ($i = 0; $i < 7; $i++) { - $out .= ($is_current_month === TRUE && $day === $cur_day) ? $this->temp['cal_cell_start_today'] : $this->temp['cal_cell_start']; + $out .= ($is_current_month === TRUE && $day == $cur_day) ? $this->temp['cal_cell_start_today'] : $this->temp['cal_cell_start']; if ($day > 0 && $day <= $total_days) { if (isset($data[$day])) { // Cells with content - $temp = ($is_current_month === TRUE && $day === $cur_day) ? + $temp = ($is_current_month === TRUE && $day == $cur_day) ? $this->temp['cal_cell_content_today'] : $this->temp['cal_cell_content']; $out .= str_replace(array('{content}', '{day}'), array($data[$day], $day), $temp); } else { // Cells with no content - $temp = ($is_current_month === TRUE && $day === $cur_day) ? + $temp = ($is_current_month === TRUE && $day == $cur_day) ? $this->temp['cal_cell_no_content_today'] : $this->temp['cal_cell_no_content']; $out .= str_replace('{day}', $day, $temp); } @@ -283,7 +283,7 @@ class CI_Calendar { $out .= $this->temp['cal_cell_blank']; } - $out .= ($is_current_month === TRUE && $day === $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end']; + $out .= ($is_current_month === TRUE && $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end']; $day++; } @@ -419,7 +419,7 @@ class CI_Calendar { } // Is the year a leap year? - if ($month === 2) + if ($month == 2) { if ($year % 400 === 0 OR ($year % 4 === 0 && $year % 100 !== 0)) { |