From: <cl...@us...> - 2003-05-29 18:28:04
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1:/tmp/cvs-serv24363/functions Modified Files: ical_parser.php init.inc.php overlapping_events.php Log Message: More error_reporting cleanup. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** ical_parser.php 29 May 2003 06:27:15 -0000 1.89 --- ical_parser.php 29 May 2003 18:28:00 -0000 1.90 *************** *** 92,96 **** $beginning, $rrule_array, $start_of_vevent, $description, $valarm_description, $start_unixtime, $end_unixtime, ! $recurrence_id, $uid, $class, $attendee, $location, $organizer ); --- 92,96 ---- $beginning, $rrule_array, $start_of_vevent, $description, $valarm_description, $start_unixtime, $end_unixtime, ! $recurrence_id, $uid, $class, $location ); *************** *** 100,103 **** --- 100,105 ---- $count = 1000000; $valarm_set = FALSE; + $attendee = array(); + $organizer = array(); unset( *************** *** 142,146 **** if (!isset($description)) $description = $master_array[$old_start_date][$old_start_time][$uid]['description']; removeOverlap($start_date_tmp, $old_start_time, $uid); ! unset($master_array[$start_date_tmp][$old_start_time]); $write_processed = false; } else { --- 144,148 ---- if (!isset($description)) $description = $master_array[$old_start_date][$old_start_time][$uid]['description']; removeOverlap($start_date_tmp, $old_start_time, $uid); ! if (isset($master_array[$start_date_tmp][$old_start_time])) unset($master_array[$start_date_tmp][$old_start_time]); $write_processed = false; } else { Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** init.inc.php 29 May 2003 06:27:15 -0000 1.30 --- init.inc.php 29 May 2003 18:28:00 -0000 1.31 *************** *** 62,71 **** } } else { ! $calcheck = $calendar_path.'/'.$default_cal_check.'.ics'; ! $calcheckopen = @fopen($calcheck, "r"); ! if ($calcheckopen == FALSE) { ! $cal_filename = $default_cal; } else { ! $cal_filename = $default_cal_check; } } --- 62,75 ---- } } else { ! if (isset($default_cal_check)) { ! $calcheck = $calendar_path.'/'.$default_cal_check.'.ics'; ! $calcheckopen = @fopen($calcheck, "r"); ! if ($calcheckopen == FALSE) { ! $cal_filename = $default_cal; ! } else { ! $cal_filename = $default_cal_check; ! } } else { ! $cal_filename = $default_cal; } } Index: overlapping_events.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/overlapping_events.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** overlapping_events.php 15 Feb 2003 20:07:08 -0000 1.10 --- overlapping_events.php 29 May 2003 18:28:00 -0000 1.11 *************** *** 163,180 **** function removeOverlap($ol_start_date, $ol_start_time, $ol_key = 0) { global $master_array, $overlap_array; ! if (sizeof($overlap_array[$ol_start_date]) > 0) { ! $ol_end_time = $master_array[$ol_start_date][$ol_start_time][$ol_key]["event_end"]; ! foreach ($overlap_array[$ol_start_date] as $keyBlock => $blockId) { ! if (($blockId["blockStart"] <= $ol_start_time) or ($blockId["blockEnd"] >= $ol_start_time)) { ! foreach ($blockId["events"] as $keyEvent => $ol_event) { ! $master_array[$ol_start_date][$ol_event["time"]][$ol_event["key"]]["event_overlap"] -= 1; ! if (($ol_event["time"] == $ol_start_time) and ($ol_event["key"] == $ol_key)) { ! unset ($overlap_array[$ol_start_date][$keyBlock]["events"][$keyEvent]); } - } - if ($blockId["maxOverlaps"] = 1) { - unset ($overlap_array[$ol_start_date][$keyBlock]); - } else { - $blockId["maxOverlaps"] -= 1; } } --- 163,182 ---- function removeOverlap($ol_start_date, $ol_start_time, $ol_key = 0) { global $master_array, $overlap_array; ! if (isset($overlap_array[$ol_start_date])) { ! if (sizeof($overlap_array[$ol_start_date]) > 0) { ! $ol_end_time = $master_array[$ol_start_date][$ol_start_time][$ol_key]["event_end"]; ! foreach ($overlap_array[$ol_start_date] as $keyBlock => $blockId) { ! if (($blockId["blockStart"] <= $ol_start_time) or ($blockId["blockEnd"] >= $ol_start_time)) { ! foreach ($blockId["events"] as $keyEvent => $ol_event) { ! $master_array[$ol_start_date][$ol_event["time"]][$ol_event["key"]]["event_overlap"] -= 1; ! if (($ol_event["time"] == $ol_start_time) and ($ol_event["key"] == $ol_key)) { ! unset ($overlap_array[$ol_start_date][$keyBlock]["events"][$keyEvent]); ! } ! } ! if ($blockId["maxOverlaps"] = 1) { ! unset ($overlap_array[$ol_start_date][$keyBlock]); ! } else { ! $blockId["maxOverlaps"] -= 1; } } } |