From: <cl...@us...> - 2003-11-05 05:31:09
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1:/tmp/cvs-serv5271/functions Modified Files: ical_parser.php Log Message: Applied 2 patches. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** ical_parser.php 24 Sep 2003 04:18:33 -0000 1.111 --- ical_parser.php 5 Nov 2003 05:31:03 -0000 1.112 *************** *** 144,147 **** --- 144,152 ---- if (!isset($start_time)) $start_time = $master_array[$old_start_date][$old_start_time][$uid]['event_start']; if (!isset($start_unixtime)) $start_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['start_unixtime']; + // Handle DURATION + if (!isset($end_unixtime) && isset($the_duration)) { + $end_unixtime = $start_unixtime + $the_duration; + $end_time = date ('Hi', $end_unixtime); + } if (!isset($end_unixtime)) $end_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['end_unixtime']; if (!isset($end_time)) $end_time = $master_array[$old_start_date][$old_start_time][$uid]['event_end']; *************** *** 658,661 **** --- 663,668 ---- $allday_start = $data; $start_date = $allday_start; + $start_unixtime = strtotime($data); + $due_date = date('Ymd', $start_unixtime); } else { if (preg_match("/^DUE;TZID=/i", $field)) { *************** *** 955,960 **** $seconds = ereg_replace('S', '', $duration[6]); $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds); ! $end_unixtime = $start_unixtime + $the_duration; ! $end_time = date ('Hi', $end_unixtime); $first_duration = FALSE; } --- 962,968 ---- $seconds = ereg_replace('S', '', $duration[6]); $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds); ! // Do this in the END:VEVENT now so that it doesn't have to come after DTSTART ! //$end_unixtime = $start_unixtime + $the_duration; ! //$end_time = date ('Hi', $end_unixtime); $first_duration = FALSE; } |