aboutsummaryrefslogtreecommitdiffstats
path: root/functions/parse
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2009-07-08 18:28:13 +0000
committerJason Oster <parasytic@users.sourceforge.net>2009-07-08 18:28:13 +0000
commitca4ff2e70c0e5de884c77d5183a603b741f9e05d (patch)
treea04a6fd3518d5914d55a07dc7a942c59fe2d913a /functions/parse
parentbc77101e73f5fdf8eeddf9bbb1d434fb396fb089 (diff)
downloadphpicalendar-ca4ff2e70c0e5de884c77d5183a603b741f9e05d.tar.gz
phpicalendar-ca4ff2e70c0e5de884c77d5183a603b741f9e05d.tar.bz2
phpicalendar-ca4ff2e70c0e5de884c77d5183a603b741f9e05d.zip
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
Diffstat (limited to 'functions/parse')
-rw-r--r--functions/parse/end_vevent.php4
-rw-r--r--functions/parse/overlapping_events.php4
2 files changed, 5 insertions, 3 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php
index 8e8186a..a6546d5 100644
--- a/functions/parse/end_vevent.php
+++ b/functions/parse/end_vevent.php
@@ -66,7 +66,7 @@ if ($length < 0){
$end_time = $start_time;
}
# get hour and minute adjusted to allowed grid times
-$drawKey = drawEventTimes($start_time, $end_time);
+$drawKey = drawEventTimes($start_time, $end_time, ($length >= (60*60*24)));
preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3);
preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_end'], $time4);
$hour = $time3[1];
@@ -349,7 +349,7 @@ foreach($recur_data as $recur_data_unixtime) {
'sequence' => $sequence,
'recur' => $recur
);
- }
+ }
if($time_key > -1) checkOverlap($this_date_tmp, $time_key, $uid);
}
} # end foreach recur_data
diff --git a/functions/parse/overlapping_events.php b/functions/parse/overlapping_events.php
index cca0ce5..509d94a 100644
--- a/functions/parse/overlapping_events.php
+++ b/functions/parse/overlapping_events.php
@@ -140,7 +140,9 @@ function checkOverlap($event_date, $event_time, $uid) {
$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);
+ $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";
// 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;

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