From ca4ff2e70c0e5de884c77d5183a603b741f9e05d Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Wed, 8 Jul 2009 18:28:13 +0000 Subject: Fix overlapping events which span a day, fix erroneously adding 15 minutes to events which span a day or more and end on the same time they start, add day-spanning icons in day and week views --- functions/template.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'functions/template.php') diff --git a/functions/template.php b/functions/template.php index 9ce5124..1400873 100644 --- a/functions/template.php +++ b/functions/template.php @@ -266,7 +266,7 @@ class Page { # ovlKey is a time slot; $ovlValue is an array with key=uid if ($ovlKey != "-1") { foreach($ovlValue as $ovl2Value) { - $nbrGridCols[($thisday)] = kgv($nbrGridCols[($thisday)], ($ovl2Value["event_overlap"] + 1)); + $nbrGridCols[$thisday] = kgv($nbrGridCols[$thisday], ($ovl2Value["event_overlap"] + 1)); } } } @@ -508,6 +508,19 @@ class Page { if ($event_status != '') { $confirmed .= ' '; } + $event_date_start = date('Ymd', $this_time_arr[$uid]['start_unixtime']); + $event_date_end = date('Ymd', $this_time_arr[$uid]['end_unixtime']); + if ($event_date_start != $event_date_end) { + if ($thisday == $event_date_start) { + $confirmed .= ' '; + } + else if ($thisday == $event_date_end) { + $confirmed .= ' '; + } + else { + $confirmed .= ' '; + } + } $event_temp = $loop_event; $event = openevent($thisday, $cal_time, $uid, $this_time_arr[$uid], $phpiCal_config->week_events_lines, 25, 'ps'); $weekdisplay .= ''."\n"; @@ -731,6 +744,19 @@ class Page { $confirmed = ''; if (is_array($event_recur)) $confirmed .= ' '; if ($event_status != '') $confirmed .= ' '; + $event_date_start = date('Ymd', $this_time_arr[$uid]['start_unixtime']); + $event_date_end = date('Ymd', $this_time_arr[$uid]['end_unixtime']); + if ($event_date_start != $event_date_end) { + if ($getdate == $event_date_start) { + $confirmed .= ' '; + } + else if ($getdate == $event_date_end) { + $confirmed .= ' '; + } + else { + $confirmed .= ' '; + } + } $daydisplay .= ''."\n"; // Start drawing the event -- cgit v1.2.3