diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-07 07:18:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-07 07:18:05 +0000 |
commit | 42081ec00f5259e6334d54ee0124c36db9a175d6 (patch) | |
tree | bd3c88a81addcbe106094a5312c344d2d3449fa0 /modules | |
parent | 27c0f490e7696cd5df5b4a0bbaaec8c63985a959 (diff) | |
download | brdo-42081ec00f5259e6334d54ee0124c36db9a175d6.tar.gz brdo-42081ec00f5259e6334d54ee0124c36db9a175d6.tar.bz2 |
- Fixed bug in calendar.class: the calendar showed the current day as a
non-clickable field. (reported by Remco)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar.class | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/calendar.class b/modules/calendar.class index b6595b360..0858215bc 100644 --- a/modules/calendar.class +++ b/modules/calendar.class @@ -13,6 +13,9 @@ class Calendar { $year = date("Y", $this->date); $day = date("d", $this->date); + // Extract today's date: + $today = mktime(23, 59, 59, date("n", time()), date("d", time()), date("Y", time())); + // Extract first day of the month: $first = date("w", mktime(0, 0, 0, $month, 1, $year)); @@ -47,7 +50,7 @@ class Calendar { // Print one cell: $date = mktime(23, 59, 59, $month, $nday, $year); if ($nday == $day) $output .= " <TD ALIGN=\"center\"><SMALL><B>$nday</B></SMALL></TD>\n"; - else if ($date > time()) $output .= " <TD ALIGN=\"center\"><SMALL>$nday</SMALL></TD>\n"; + else if ($date > $today) $output .= " <TD ALIGN=\"center\"><SMALL>$nday</SMALL></TD>\n"; else $output .= " <TD ALIGN=\"center\"><SMALL><A HREF=\"index.php?date=$date\" STYLE=\"text-decoration: none;\">$nday</A></SMALL></TD>\n"; // Start every week on a new line: |