From fb92dbf5d683c3d92a76216c09d23e338c7d3341 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 13 Jun 2011 20:32:30 -0700 Subject: link events + personal notes to profile tabs --- mod/events.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index a4809607c..1418a7549 100644 --- a/mod/events.php +++ b/mod/events.php @@ -130,6 +130,14 @@ function events_content(&$a) { if(! $m) $m = intval($thismonth); + // Put some limits on dates. The PHP date functions don't seem to do so well before 1900. + // An upper limit was chosen to keep search engines from exploring links endlessly. + + if($y < 1901) + $y = 1900; + if($y > 2099) + $y = 2100; + $nextyear = $y; $nextmonth = $m + 1; if($nextmonth > 12) { @@ -144,11 +152,18 @@ function events_content(&$a) { $prevmonth = 12; $prevyear --; } + $o .= ''; - $o .= '' . t('<< Previous') . ' | ' . t('Next >>') . ''; + $o .= '
'; + + $o .= ''; $o .= cal($y,$m,false, ' eventcal'); + $o .= ''; + $o .= '
'; + $o .= '
'; + $dim = get_dim($y,$m); $start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0); $finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59); -- cgit v1.2.3