aboutsummaryrefslogtreecommitdiffstats
path: root/functions/ical_parser.php
diff options
context:
space:
mode:
authordavef <davefd2@users.sourceforge.net>2005-05-16 19:14:59 +0000
committerdavef <davefd2@users.sourceforge.net>2005-05-16 19:14:59 +0000
commit81b77a2e087100632ef3c1fb1f8d2f75f867a27e (patch)
treee224a6b82613a883d9211c4a304b2d34955b2386 /functions/ical_parser.php
parentc4cd9ef3029afc434d5ae41693d059ccfe459799 (diff)
downloadphpicalendar-81b77a2e087100632ef3c1fb1f8d2f75f867a27e.tar.gz
phpicalendar-81b77a2e087100632ef3c1fb1f8d2f75f867a27e.tar.bz2
phpicalendar-81b77a2e087100632ef3c1fb1f8d2f75f867a27e.zip
Big openevent cleanup - changed the openevent api, which significantly simplifies the code.
Diffstat (limited to 'functions/ical_parser.php')
-rw-r--r--functions/ical_parser.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 0b5c77f..595ead9 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -462,7 +462,9 @@ foreach ($cal_filelist as $filename) {
$master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $wkst;
break;
case 'END':
-
+
+ $recur = $master_array[($start_date)][($hour.$minute)][$uid]['recur'];
+
// Modify the COUNT based on BYDAY
if ((is_array($byday)) && (isset($count))) {
$blah = sizeof($byday);
@@ -677,7 +679,7 @@ foreach ($cal_filelist as $filename) {
$end_time2 = strtotime('+'.$diff_allday_days.' days', $recur_data_time);
while ($start_time2 < $end_time2) {
$start_date2 = date('Ymd', $start_time2);
- $master_array[($start_date2)][('-1')][] = array ('event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class );
+ $master_array[($start_date2)][('-1')][$uid] = array ('event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class, 'recur' => $recur );
$start_time2 = strtotime('+1 day', $start_time2);
}
} else {
@@ -706,7 +708,7 @@ foreach ($cal_filelist as $filename) {
// Let's double check the until to not write past it
$until_check = $start_date_tmp.$time_tmp.'00';
if ($abs_until > $until_check) {
- $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' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url) ;
+ $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' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur);
checkOverlap($start_date_tmp, $time_tmp, $uid);
}
$start_tmp = strtotime('+1 day',$start_tmp);
@@ -722,7 +724,7 @@ foreach ($cal_filelist as $filename) {
// Let's double check the until to not write past it
$until_check = $recur_data_date.$hour.$minute.'00';
if ($abs_until > $until_check) {
- $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url);
+ $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur);
checkOverlap($recur_data_date, ($hour.$minute), $uid);
}
}
@@ -1196,7 +1198,7 @@ if ($parse_file) {
//print_r($overlap_array);
//print_r($day_array);
//print_r($rrule_array);
-//print_r($recurrence_delete);
+//print_r($recurrence_delete);
//print '</pre>';
// Set a calender name for all calenders combined
@@ -1205,5 +1207,5 @@ if ($cal == $ALL_CALENDARS_COMBINED) {
}
$template_started = getmicrotime();
-
+
?>

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