From 4755bf8f506fda3b64b8267c10d06b6b747f8321 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 23 Nov 2003 21:41:51 +0000 Subject: Fixed some other bleed_time issues, now any bleeding event displays the real end time no matter if its split or not. --- config.inc.php | 2 +- functions/ical_parser.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.inc.php b/config.inc.php index debcf57..729da3e 100644 --- a/config.inc.php +++ b/config.inc.php @@ -24,7 +24,7 @@ $default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the $tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X) $calendar_path = ''; // Leave this blank on most installs, place your full path to calendars if they are outside the phpicalendar folder. $second_offset = '0'; // The time in seconds between your time and your server's time. -$bleed_time = '0200'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359' +$bleed_time = '0400'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359' // Advanced settings for custom installs, cookies, etc. // In most cases these will not need to be set. diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 2d23d79..e2d9a97 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -254,8 +254,9 @@ foreach ($cal_filelist as $filename) { $end_time_tmp = $end_time; } else { $end_time_tmp = '2400'; - $display_end_tmp = '0000'; + $display_end_tmp = $end_time; } + $nbrOfOverlaps = checkOverlap($start_date_tmp, $start_time_tmp, $end_time_tmp, $uid); $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); $start_tmp = strtotime('+1 day',$start_tmp); @@ -598,11 +599,11 @@ foreach ($cal_filelist as $filename) { $end_time_tmp = $end_time; } else { $end_time_tmp = '2400'; - $display_end_tmp = '0000'; + $display_end_tmp = $end_time; } // Let's double check the until to not write past it - $until_check = $recur_data_date.$time_tmp.'00'; + $until_check = $start_date_tmp.$time_tmp.'00'; if ($abs_until > $until_check) { $nbrOfOverlaps = checkOverlap($start_date_tmp, $start_time_tmp, $end_time_tmp, $uid); $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url) ; -- cgit v1.2.3