From: <cl...@us...> - 2003-11-20 00:13:51
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1:/tmp/cvs-serv19761/functions Modified Files: ical_parser.php init.inc.php Log Message: URL Support added to the parser. Added test calendar. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** ical_parser.php 19 Nov 2003 07:54:09 -0000 1.130 --- ical_parser.php 20 Nov 2003 00:13:08 -0000 1.131 *************** *** 94,98 **** $start_time, $end_time, $start_date, $end_date, $summary, $allday_start, $allday_end, $start, $end, $the_duration, ! $beginning, $rrule_array, $start_of_vevent, $description, $bd, $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, $recurrence_id, $uid, $class, $location, $rrule, $abs_until, $until_check --- 94,98 ---- $start_time, $end_time, $start_date, $end_date, $summary, $allday_start, $allday_end, $start, $end, $the_duration, ! $beginning, $rrule_array, $start_of_vevent, $description, $bd, $url, $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, $recurrence_id, $uid, $class, $location, $rrule, $abs_until, $until_check *************** *** 257,261 **** } $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, 'display_end' => $display_end_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), 'calnumber' => $calnumber, 'calname' => $actual_calname ); $start_tmp = strtotime('+1 day',$start_tmp); } --- 257,261 ---- } $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, 'display_end' => $display_end_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), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); $start_tmp = strtotime('+1 day',$start_tmp); } *************** *** 272,276 **** if (!in_array($start_date, $except_dates)) { $nbrOfOverlaps = checkOverlap($start_date, $start_time, $end_time_tmp1, $uid); ! $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_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' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname ); if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; } --- 272,276 ---- if (!in_array($start_date, $except_dates)) { $nbrOfOverlaps = checkOverlap($start_date, $start_time, $end_time_tmp1, $uid); ! $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time_tmp1, 'display_end' => $display_end_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' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; } *************** *** 574,578 **** while ($start_time2 < $end_time2) { $start_date2 = date('Ymd', $start_time2); ! $master_array[($start_date2)][('-1')][]= array ('event_text' => $summary, 'description' => $description, 'calnumber' => $calnumber, 'calname' => $actual_calname ); $start_time2 = strtotime('+1 day', $start_time2); } --- 574,578 ---- while ($start_time2 < $end_time2) { $start_date2 = date('Ymd', $start_time2); ! $master_array[($start_date2)][('-1')][]= array ('event_text' => $summary, 'description' => $description, 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); $start_time2 = strtotime('+1 day', $start_time2); } *************** *** 599,603 **** } $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, 'display_end' => $display_end_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, 'calname' => $actual_calname); $start_tmp = strtotime('+1 day',$start_tmp); } --- 599,603 ---- } $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, 'display_end' => $display_end_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, 'calname' => $actual_calname, 'url' => $url) ; $start_tmp = strtotime('+1 day',$start_tmp); } *************** *** 614,618 **** if ($abs_until > $until_check) { $nbrOfOverlaps = checkOverlap($recur_data_date, $start_time, $end_time_tmp1, $uid); ! $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' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname); } } --- 614,618 ---- if ($abs_until > $until_check) { $nbrOfOverlaps = checkOverlap($recur_data_date, $start_time, $end_time_tmp1, $uid); ! $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' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url); } } *************** *** 782,792 **** case 'STATUS': - // VEVENT: TENTATIVE, CONFIRMED, CANCELLED - // VTODO: NEEDS-ACTION, COMPLETED, IN-PROCESS, CANCELLED $status = "$data"; break; case 'CLASS': - // VEVENT, VTODO: PUBLIC, PRIVATE, CONFIDENTIAL $class = "$data"; break; --- 782,789 ---- *************** *** 989,995 **** $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; } --- 986,989 ---- *************** *** 1017,1020 **** --- 1011,1017 ---- case 'LOCATION': $location = $data; + break; + case 'URL': + $url = $data; break; } Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** init.inc.php 19 Nov 2003 07:54:09 -0000 1.42 --- init.inc.php 20 Nov 2003 00:13:08 -0000 1.43 *************** *** 7,11 **** // uncomment when developing, comment for shipping version ! error_reporting (E_ALL); $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; --- 7,11 ---- // uncomment when developing, comment for shipping version ! error_reporting (0); $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; |