|
From: <cl...@us...> - 2003-11-15 19:22:13
|
Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv21281/functions
Modified Files:
ical_parser.php
Log Message:
Fix for [ phpicalendar-Bugs-822211 ] repeating calendar event
displays wrong
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** ical_parser.php 14 Nov 2003 22:33:11 -0000 1.124
--- ical_parser.php 15 Nov 2003 19:22:07 -0000 1.125
***************
*** 108,111 ****
--- 108,112 ----
$count = 1000000;
$valarm_set = FALSE;
+ $firstday = FALSE;
$attendee = array();
$organizer = array();
***************
*** 247,259 ****
$time_tmp = $hour.$minute;
$start_time_tmp = $start_time;
} else {
$time_tmp = '0000';
$start_time_tmp = '0000';
- }
- if ($start_date_tmp == $end_date_tmp) {
$end_time_tmp = $end_time;
- } else {
- $end_time_tmp = '2400';
}
$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, '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) );
--- 248,258 ----
$time_tmp = $hour.$minute;
$start_time_tmp = $start_time;
+ $end_time_tmp = '0000';
} else {
$time_tmp = '0000';
$start_time_tmp = '0000';
$end_time_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, '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) );
***************
*** 581,596 ****
while ($start_tmp < $end_unixtime_tmp) {
$start_date_tmp = date('Ymd',$start_tmp);
! if ($start_date_tmp == $start_date) {
$time_tmp = $hour.$minute;
$start_time_tmp = $start_time;
} else {
$time_tmp = '0000';
$start_time_tmp = '0000';
- }
- if ($start_date_tmp == $end_date_tmp) {
$end_time_tmp = $end_time;
! } else {
! $end_time_tmp = '2400';
}
$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, '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);
--- 580,595 ----
while ($start_tmp < $end_unixtime_tmp) {
$start_date_tmp = date('Ymd',$start_tmp);
! if (($start_date_tmp == $start_date) || ($firstday == FALSE)) {
$time_tmp = $hour.$minute;
$start_time_tmp = $start_time;
+ $end_time_tmp = '0000';
+ $firstday = TRUE;
} else {
$time_tmp = '0000';
$start_time_tmp = '0000';
$end_time_tmp = $end_time;
! $firstday = FALSE;
}
+
$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, '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);
***************
*** 598,601 ****
--- 597,601 ----
}
} else {
+
// Let's double check the until to not write past it
$until_check = $recur_data_date.$hour.$minute.'00';
***************
*** 632,636 ****
// Clear event data now that it's been saved.
! unset($start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $nbrOfOverlaps, $description, $status, $class, $location, $organizer, $attendee);
--- 632,636 ----
// Clear event data now that it's been saved.
! unset($time_tmp, $start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $nbrOfOverlaps, $description, $status, $class, $location, $organizer, $attendee);
|