From 694d2fb6921bc2e48051eb8e2c20bd0fe1dbd609 Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Fri, 16 Apr 2010 19:10:17 +0000 Subject: Better fix for Bug 2968512 --- functions/parse/end_vevent.php | 3 ++- functions/parse/overlapping_events.php | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index a6546d5..7def602 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -326,7 +326,8 @@ foreach($recur_data as $recur_data_unixtime) { $master_array[$this_date_tmp][$time_key][$uid] = array ( 'event_start' => $start_time, # hhmm 'event_end' => $end_time, # hhmm - 'display_end' => $display_end_tmp, # hhmm display_start is $time_key + 'display_start' => $time_key, # hhmm + 'display_end' => $display_end_tmp, # hhmm 'start_unixtime' => $start_unixtime_tmp, # start unixtime for this recurrence 'end_unixtime' => $end_unixtime_tmp, # end unixtime for this recurrence 'event_text' => $summary, # diff --git a/functions/parse/overlapping_events.php b/functions/parse/overlapping_events.php index ab71db9..d04d01c 100644 --- a/functions/parse/overlapping_events.php +++ b/functions/parse/overlapping_events.php @@ -138,11 +138,7 @@ function checkOverlap($event_date, $event_time, $uid) { $event = $master_array[$event_date][$event_time][$uid]; // Copy out the array - we replace this at the end. $ol_day_array = @$overlap_array[$event_date]; - $draw_end = $event['event_end']; - if (isset($event['display_end'])) $draw_end = $event['display_end']; - $drawTimes = drawEventTimes($event['event_start'], $draw_end, ($event['event_length'] >= (60*60*24))); - if ($event_time == "0000") $drawTimes['draw_start'] = "0000"; - if ($draw_end == "2400") $drawTimes['draw_end'] = "2400"; + $drawTimes = drawEventTimes($event['display_start'], $event['display_end'], ($event['event_length'] >= (60*60*24))); // Track if $event has been merged in, so we don't re-add the details to 'event' or 'overlapRanges' multiple times. $already_merged_once = false; @@ -182,9 +178,7 @@ function checkOverlap($event_date, $event_time, $uid) { foreach ($time as $loop_event_key => $loop_event) { // Make sure we haven't already dealt with the event, and we're not checking against ourself. if ($loop_event['event_overlap'] == 0 && $loop_event_key != $uid) { - $loopDrawTimes = drawEventTimes($loop_event['event_start'], $loop_event['display_end'], ($loop_event['event_length'] >= (60*60*24))); - if ($event_time == "0000") $loopDrawTimes['draw_start'] = "0000"; - if ($draw_end == "2400") $loopDrawTimes['draw_end'] = "2400"; + $loopDrawTimes = drawEventTimes($loop_event['display_start'], $loop_event['display_end'], ($loop_event['event_length'] >= (60*60*24))); if ($loopDrawTimes['draw_start'] < $drawTimes['draw_end'] && $loopDrawTimes['draw_end'] > $drawTimes['draw_start']) { if ($loopDrawTimes['draw_start'] < $drawTimes['draw_start']) { $block_start = $loopDrawTimes['draw_start']; -- cgit v1.2.3