aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-04-16 19:10:17 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-04-16 19:10:17 +0000
commit694d2fb6921bc2e48051eb8e2c20bd0fe1dbd609 (patch)
tree251ff8c2aa2195b9a7a8b26ebc15c35e73e3f4da
parent2ccdb089fcfdcb7ceb66283df426de105d22c8c3 (diff)
downloadphpicalendar-694d2fb6921bc2e48051eb8e2c20bd0fe1dbd609.tar.gz
phpicalendar-694d2fb6921bc2e48051eb8e2c20bd0fe1dbd609.tar.bz2
phpicalendar-694d2fb6921bc2e48051eb8e2c20bd0fe1dbd609.zip
Better fix for Bug 2968512
-rw-r--r--functions/parse/end_vevent.php3
-rw-r--r--functions/parse/overlapping_events.php10
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'];

© 2014-2024 Faster IT GmbH | imprint | privacy policy